Post by daveydave » Fri Aug 28, 2015 10:37 pm

Hello!

I've just taken over a site after their previous developer disappeared. I've been working with OpenCart for 5 years so am quite familiar with it, but have encountered an unusual problem:

This problem only occurs on the Order info page in "my account" for front end users. On products with multiple options, when the customer clicks the re-order select box it only adds the product and not the options or the price associated with the options. Basically, some people are checking out with products priced at £0.00 when reordering.

The site they are running is OpenCart 1.5.1.3 and I've already started to build them a new template in 2.0.3.1 but need to fix this before I can start migrating the data across.

Has anyone encountered this? I've searched the forums and have tried a few things like messing with stock numbers etc, but it seems this only started since Paypal told them to make a change to their Paypal Express module, which should have no impact on this, right? I've checked the change of files dates on the server and the last changes seem to have been made in March (apart from the PPexpress module, which only had one change on one line).

I'd be really grateful for at least a pointer in the right direction. I've looked at controller/account/order.php , but this has been unchanged since installation.

New member

Posts

Joined
Fri Aug 28, 2015 10:26 pm

Post by daveydave » Tue Sep 08, 2015 5:23 pm

OK, For anyone who encounters this in the future, I found out the problem:

Turns out that the client had recently exported the products, changed some stuff with the options and then imported the changes. On their version of the site with their version of the import/export plugin, it lost some of the order data. I was able to restore the database to an older version and it all works fine now.

So, on some old versions of the site import/export can break stuff in order histories.I've told them not to do anything until I've made them their version 2.0.3.1 version of the site.

New member

Posts

Joined
Fri Aug 28, 2015 10:26 pm

Post by thomash2 » Sun Nov 05, 2017 12:58 am

I found in my case that when the options were 'image' type, the error occurred. I traced it to a bug in catalog/controller/account/order.php which for some reason forgot to pass on the order options only for 'image' type. It can be fixed by putting it back in:

Code: Select all

<file name="catalog/controller/account/order.php">
 <operation info="add image type for options, to fix bug in original code">                 
         <search position="replace" ><![CDATA[if ($order_option['type'] == 'select' || $order_option['type'] == 'radio') {]]>  </search>
         <add><![CDATA[if ($order_option['type'] == 'select' || $order_option['type'] == 'radio' || $order_option['type'] == 'image') {]]>
         </add>
 </operation>
 </file>

New member

Posts

Joined
Tue Jul 30, 2013 12:44 am
Who is online

Users browsing this forum: No registered users and 35 guests