osCmax v2.5 User Manual
Results 1 to 6 of 6

Sort Option on Order Confirmation Page

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

      
  1. #1
    Active Member
    Join Date
    Jun 2004
    Location
    Glued to Computer Chair
    Posts
    108
    Rep Power
    0


    Default Sort Option on Order Confirmation Page

    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.

  2. #2
    Active Member
    Join Date
    Jun 2004
    Location
    Glued to Computer Chair
    Posts
    108
    Rep Power
    0


    Default

    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. #3
    Active Member
    Join Date
    Jun 2004
    Location
    Glued to Computer Chair
    Posts
    108
    Rep Power
    0


    Default

    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?
    True Meaning of Lost: Building a web site without knowledge or skill

    True Meaning of Crazy: Building a web site anyhow

    The Net Results: Never needing a comb again

    www.MakeMeThis.com

  4. #4
    Active Member red_fraggle's Avatar
    Join Date
    Feb 2004
    Location
    wilmington, NC
    Posts
    343
    Rep Power
    9


    Default

    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. #5
    Anonymous
    Guest


    Default

    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. #6
    Active Member red_fraggle's Avatar
    Join Date
    Feb 2004
    Location
    wilmington, NC
    Posts
    343
    Rep Power
    9


    Default

    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.

Similar Threads

  1. Product Sort Order
    By davem in forum osCmax v2 Customization/Mods
    Replies: 4
    Last Post: 05-21-2006, 04:33 PM
  2. sort order to pot!!
    By moreduff in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 04-12-2005, 04:57 AM
  3. Product Sort Order
    By xtech in forum osCmax v1.7 Discussion
    Replies: 6
    Last Post: 04-08-2005, 07:49 AM
  4. Change sort order on new products
    By Lord in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 03-23-2005, 02:05 AM
  5. Set my main page sort order?
    By fridgemags in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 05-19-2004, 12:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •