17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1686 Views |
-
sprintf() error on eCommerce

22 April 2008 at 9:04am
Hello,
One step closer to getting the 0.5.2 rc1 eCommerce up and running - but i've hit a brick wall with this XML Parsing error.
http://www.affordablefantasy.co.nz/products/
I have been told to enable i18n, which I have done - set the locale to en_US, db/build?flush=1 and the error still appears. I'm lost!
Cheers
-
Re: sprintf() error on eCommerce

28 April 2008 at 2:36pm
Am not sure if you have found the answer to your question, but just in case you haven't and for anyone else out there, try this:
navigate to \sapphire\core\SSViewer.php, locate the following lines:
// i18n
ereg('.*[\/](.*)',$template,$path);
$content = ereg_replace('<' . '% +_t\((\'([^\']*)\'|"([^"]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '<?= _t(\''. $path[1] . '.\\2\\3\'\\4) ?>', $content);right below that look for:
// i18n - sprintf => "sprintf(_t(...),$argument)"
// CAUTION: No spaces allowed between arguments!
$content = ereg_replace('<' . '% +sprintf\(_t\((\'([^\']*)\'|"([^"]*)")(([^)]|\)[^ ]|\) +[^% ])*)\),\<\?= +([^\?]*) +\?\>) +%' . '>', '<?= sprintf(_t(\''. $path[1] . '.\\2\\3\'\\4),\\6) ?>', $content);if you don't find it, then include it (make sure you place it right below).
OR just use the lastest version of SSviewer.php in trunk.
Hope this helps somebody out there.
-
Re: sprintf() error on eCommerce

28 April 2008 at 3:04pm Last edited: 28 April 2008 3:36pm
Thank you.
I think it worked!
| 1686 Views | ||
|
Page:
1
|
Go to Top |


