osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

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


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-01-2004, 12:51 AM
Active Member
 
Join Date: Jun 2004
Location: Glued to Computer Chair
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
makemethis
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 07-01-2004, 02:04 PM
Active Member
 
Join Date: Jun 2004
Location: Glued to Computer Chair
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
makemethis
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 07-03-2004, 09:33 AM
Active Member
 
Join Date: Jun 2004
Location: Glued to Computer Chair
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
makemethis
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 07-03-2004, 09:53 AM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 07-04-2004, 07:14 AM
Anonymous
Guest
 
Posts: n/a
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 07-07-2004, 07:57 AM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
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.
__________________
Clifton Murphy CEO/CTO
Hyperactive Inc.
osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 03:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax