Forums / General Questions / Strange product id in shopping cart

Strange product id in shopping cart

Locked

Views: 758

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
23 Jul 2010, 12:43 PM
#1
tlahtine avatar

tlahtine

New Zenner

Join Date:
Jul 2010
Posts:
36
Plugin Contributions:
0

Strange product id in shopping cart

I'm developing some code for an observer, notified by NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE_ADD_PRODUCTS, i.e. after the order has been made.

I'm going trough the content of shopping chart $_SESSION[cart]->get_products()

When I display the product id's there is one strange id:
[id] = 183:b82db7468155b3b7ce02a50e8965db33

This is for a product, which actually has an id 183. But what the heck is the rest :b82db7468155b3b7ce02a50e8965db33 ???

23 Jul 2010, 4:20 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Strange product id in shopping cart

That's a hash which represents the attributes selected by the customer when adding that product to their cart.
Products which don't have attributes don't have any hash added to them.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Jul 2010, 5:40 PM
#3
tlahtine avatar

tlahtine

New Zenner

Join Date:
Jul 2010
Posts:
36
Plugin Contributions:
0

Re: Strange product id in shopping cart

DrByte:

That's a hash which represents the attributes selected by the customer when adding that product to their cart.
Products which don't have attributes don't have any hash added to them.

Thanks a lot!

Can I use the hash somehow i.e. decode what are the attributes selected?