This is a discussion on Sort Option on Order Confirmation Page within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; I use text options for my products. On the product page and in the shopping cart, the options list in ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I use text options for my products. On the product page and in the shopping cart, the options list in order the way I need them to: Line 1a Line 2a Line 3a etc But when you go through checkout and you get to the order confirmation page, the product options reverse order and become: Line 3a Line 2a Line 1a This occcurs when a customer is not signed in and then either signs in as a new customer or returning customer. It seems that, when the session is coverted to a customer basket, the order of the options is lost and becomes random. Therefore when the customer gets to the confirmation page, the options appear in a random order. Note: if a customer signs in first before adding anything to their cart, the order of options remains sorted completely through the process. I have looked on here and at the code in as many places as I could think. I have MS2 Max 1.5.5 with the attribute text mod in it. Please make me feel stupid and tell me where I missed this one at. |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| In trying to solve this, I added the sort option module into the site. It works great on the front end but did not solve the confirmation page issue. Is there a way to add a sort to the checkout_confirmation.tpl.php in the section where it is pulling for the information? The code below is where I need the sort: if ( (isset ($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) ( echo '<br><nobr><small>$nbsp;<i> - . $order->products[i]['attributes'][j]['option'] . ': ' . $order->products[i]['attributes'][j]['value'] . '</i></small></nobr>'; The sort should be for the 'option', alphabetically (ok) and ascending. Thank you for your assistance as it will be greatly appreciated! |
|
#3
| |||
| |||
| Second thought on solving this. The sort order from within the session isn't being passed through to the customer basket when the customer signs in. Is there a way to code the session to pass the sort order information to the customer basket and if so would that require a additional field in the customer basket table? If I can get this sort in the customer basket right, then I know it will make it to the order table correctly thus I won't need to make changes to sort on the checkout_confirmation.tpl.php. Any suggestions or thoughts? |
|
#4
| ||||
| ||||
| Give me a few im re-writing the sort order in this bit of code for you, ill post a follow up with code changes shortly. |
|
#5
| |||
| |||
| Problem solved by catalog/includes/class/shopping_cart.php This file controls the shopping cart. I added: "order by products_options_id" to the main attribute query line and that stopped the random results I was getting. The attribute sort mod which I added from osc site only controls up to the display page products_info. If the shopping_cart.php had the attribute_sort added to it, then one would be able to have uniform control of the display across the site. I am getting the same look with my fix but I know it is only because of the systematic way I added the attribute options id to my site. |
|
#6
| ||||
| ||||
| The code you have above simply echoes an Array one element at a time. The scipt that creates this array is what needs modifying. Where is the code for the order script? Sorry to be kind of vague but were super busy and i dont have time to look for it, if you can tell me where it is ill re-write it for you.
__________________ Clifton Murphy CEO/CTO Hyperactive Inc. osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists! |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Product Sort Order | davem | osCMax v2 Customization/Mods | 4 | 05-21-2006 05:33 PM |
| sort order to pot!! | moreduff | osCMax v1.7 Discussion | 0 | 04-12-2005 05:57 AM |
| Product Sort Order | xtech | osCMax v1.7 Discussion | 6 | 04-08-2005 08:49 AM |
| Change sort order on new products | Lord | osCommerce 2.2 Modification Help | 2 | 03-23-2005 03:05 AM |
| Set my main page sort order? | fridgemags | osCMax v1.7 Discussion | 1 | 05-19-2004 01:34 PM |