Jump to content

CubeCart6 can't change any order from pending


Recommended Posts

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?

Thanks

Joe

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.)

 

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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}
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...