JLM Audio Posted April 30, 2015 Share Posted April 30, 2015 Hi We have just upgraded from CubeCart4 to CubeCart6 and are having problems where we cannot change Orders from Pending to Processed, we just get a blank screen and when looking at the error log it says;[Exception] /home/jlmaudio/public_html/shop/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:70 - Syntax error in template "5663145053a30af20b3df31330399c735f309ecc" on line 70 "{if !empty($DATA.ship_method)}{$DATA.ship_method|replace:'_':' '}:{if !empty($DATA.ship_product)} ({$DATA.ship_product}){/if}{else}Shipping:{/if}I also put in a manual order and set it to processed which is seem to save but put the status to pending.Any thoughts on how we can fix this?ThanksJoe Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 30, 2015 Share Posted April 30, 2015 That seems to be a rendered template (located in the /cache/skin/) from one of the email templates. The email templates use the $DATA array.I don't see anything wrong with the statements, but I'm not finding which email template it is.When an order goes to Processing, one or two emails are sent. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 30, 2015 Share Posted April 30, 2015 But just to make sure, edit the template (which one?) and change:{if !empty($DATA.ship_method)}, and {if !empty($DATA.ship_product)}to:{if $DATA.ship_method}, and {if $DATA.ship_product}Smarty will be able to determine the proper truthiness of the variable. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 30, 2015 Share Posted April 30, 2015 On the other hand, I see plenty of examples of {if !empty($var)}.Maybe for some reason it doesn't like this: {$DATA.ship_method|replace:'_':' '}. I think it's perfectly fine. But try: {$DATA.ship_method|replace:'_':' '}. (It prevents the possible line breaking into two.) Quote Link to comment Share on other sites More sharing options...
JLM Audio Posted April 30, 2015 Author Share Posted April 30, 2015 Tried first suggestion change in the Order Confirmation template and no different, will try the second suggestion, thx Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 30, 2015 Share Posted April 30, 2015 Is this an edited Order Confirmation template? Or is it still the stock version? (Other than what you are editing now?) Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 30, 2015 Share Posted April 30, 2015 Oh, and since you are editing a template, be sure to clear the cache (admin, Maintenance, Rebuild tab, Clear Cache). Otherwise, Smarty will just use the cached (faulty) template.Unless you have cache disabled (admin, Store Settings, Advanced tab). Quote Link to comment Share on other sites More sharing options...
JLM Audio Posted April 30, 2015 Author Share Posted April 30, 2015 Cleared cache and still no difference.We had added our details to this template, is this Ok?Also took it back to the stock version and not working either.Any other suggestions?Thx Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 30, 2015 Share Posted April 30, 2015 So whats happening is that on clean install its fine. After saving the email template its converting part of the Smarty syntax to HTML encoding. This is a bug for sure. In source view of the "Cart: Order Confirmed" email content change:{if !empty($DATA.ship_method)}{$DATA.ship_method|replace:'_':' '}:{if !empty($DATA.ship_product)} ({$DATA.ship_product}){/if}{else}Shipping:{/if}To:{if !empty($DATA.ship_method)}{$DATA.ship_method}:{if !empty($DATA.ship_product)} ({$DATA.ship_product}){/if}{else}Shipping:{/if} Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 30, 2015 Share Posted April 30, 2015 .. I have opened a bug report here. https://github.com/cubecart/v6/issues/494 Quote Link to comment Share on other sites More sharing options...
JLM Audio Posted May 1, 2015 Author Share Posted May 1, 2015 Hi Al Yes it must have been us editing the template that caused the issue. Editing to make what we thought was original html didn't fix it but once we copied from another fresh install it worked fine again. We have now been able to make our modifications to the template and all working fine. Thanks for your help guys. Cheers Joe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.