Order of items in shopping cart and "Thank You" re

This is an archive of old posting to the User Forum

Order of items in shopping cart and "Thank You" re

Postby Eddie Caplan » Tue Nov 16, 2004 4:17 pm

When orders hit the final "Thank You" page, data about the order is
passed through to the final script. For example:

B01-Name=Sweater
B01-Price=36.00
B01-Quantity=1
<... etc ...>
B02-Name=Pants
B02-Price=42.00
B02-Quantity=2
<... etc ...>
B03-Name=Gucci+Shoes
B03-Price=499.99
B03-Quantity=1
<... etc ...>

My questions are these:

1) Are the numbers of the line items ("B01", "B02", "B03")
**GUARANTEED** to be in the same order as they appeared in the shopping
cart?

2) Are the numbers of the line items **GUARANTEED** to be in the same
order that they were ADDED to the shopping cart?

3) What happens if something is added to the shopping cart (from a
products page) but is removed by the customer while viewing the
shopping cart? Are the items renumbered?


Why am I asking? Because I am desparately trying to pass extra
information along with the order, to be used on the back-end of the
order process AFTER the credit card has been approved. I can set PHP
session variables PRIOR to entering the shopping cart which I can read
on the back-end. BUT I will need to match this data with the proper
line items in the shopping cart.

The only other way that I can pass data through the shopping cart (that
I know of) is to use the freeform text field (a.k.a "Ordering
Options"). But anything that appears in that field will be visible on
the receipt... which I don't want. And the customer has the ability to
change (that is, "mess up") the info in the text field.

(I suppose that if I have to, I could pass a "magic number" in that
text field which will act as an index into my PHP session variables.
But that would mean the magic number would be visible -- and changeable
-- by the customer.)

If ANYBODY has ANY ideas on how I could better pass through and match
up the back-end of the ordering process with the front-end, I would
appreciate hearing about it.

Sorry for the length of this message.
Eddie
Eddie Caplan
 

Re: Order of items in shopping cart and "Thank You" receipt

Postby jim » Tue Nov 16, 2004 9:09 pm

In a 7.x pro store there is javascript for each of the items added to
the cart as shown below. Maybe you could use some of that information.

ss_name[0]="Water Buffalo Horn";
ss_sku[0]="PWB1";
ss_quantity[0]=1;
ss_weight[0]=0.00;
ss_price[0]="12.00";
ss_total_price[0]="12.00";
ss_field1[0]="";
ss_field2[0]="";
ss_field3[0]="";
ss_field4[0]="";
ss_field5[0]="";

See answers to your other question marked by ******* below
Jim
Eddie Caplan wrote:

When orders hit the final "Thank You" page, data about the order is
passed through to the final script. For example:

B01-Name=Sweater
B01-Price=36.00
B01-Quantity=1
... etc ...
B02-Name=Pants
B02-Price=42.00
B02-Quantity=2
... etc ...
B03-Name=Gucci+Shoes
B03-Price=499.99
B03-Quantity=1
... etc ...

My questions are these:

1) Are the numbers of the line items ("B01", "B02", "B03")
**GUARANTEED** to be in the same order as they appeared in the shopping
cart?

********* No, Line items may be missing if the item was deleted so they

may not all be consecutive. Also coupons and gift certificates could
also be in the mix of line items depending on when they were added.
2) Are the numbers of the line items **GUARANTEED** to be in the same
order that they were ADDED to the shopping cart?

********* No. If an item is deleted the next item added to the cart

would take the place of the one deleted.
3) What happens if something is added to the shopping cart (from a
products page) but is removed by the customer while viewing the
shopping cart? Are the items renumbered?

********* Items are not renumbered but ones that are added after an item

is deleted will be given the number of the first empty deleted slot. So
if you add 3 items A, B, C to the cart they would be numbers B01,B02,B03
If you delete B and add a coupon the coupon would become B02 If you then
add another product, D, it would become B04 but in the cart the items
would display as A C D coupon.
Why am I asking? Because I am desparately trying to pass extra
information along with the order, to be used on the back-end of the
order process AFTER the credit card has been approved. I can set PHP
session variables PRIOR to entering the shopping cart which I can read
on the back-end. BUT I will need to match this data with the proper
line items in the shopping cart.

The only other way that I can pass data through the shopping cart (that
I know of) is to use the freeform text field (a.k.a "Ordering
Options"). But anything that appears in that field will be visible on
the receipt... which I don't want. And the customer has the ability to
change (that is, "mess up") the info in the text field.

(I suppose that if I have to, I could pass a "magic number" in that
text field which will act as an index into my PHP session variables.
But that would mean the magic number would be visible -- and changeable
-- by the customer.)

If ANYBODY has ANY ideas on how I could better pass through and match
up the back-end of the ordering process with the front-end, I would
appreciate hearing about it.

Sorry for the length of this message.
Eddie
jim
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 27 guests

cron