I have written a very complex add on that imports orders from our companies mail order software into CS-Cart. I have a problem, I can't seem to find any documentation on how fn_generate_cart_id is used.
I am trying to generate an item_id for the table order_details. I know I need to use fn_generate_cart_id and pass the product_id and product_options but when I do this
it generates a different item_id than when I actually create an order through CS-Cart.
I have edited the fn.cart.php file to output the arrays so I can troubleshoot this but
still have no idea whats wrong. I hope someone can help me.
After adding a product to my cart, When I visit the View Cart page and click RECALCULATE my debugging output shows two different cart_ids are being returned by the function fn_generate_cart_id. The second cart id is the same one I have been able to generate with my code but the first cart id is the one that CS-Cart actually ends up using when inserting the record into the order_details table. I can not figure at all how the Cart ID 1010967789 was generated. does anyone know?
Array
(
[product_options] => Array
(
[120] => 707
[122] => 725
[123] => 733
[121] => 698
)
)
Cart ID: 1010967789
Array
(
[product_options] => Array
(
[120] => 707
[122] => 725
[123] => 733
[121] => 698
)
)
Cart ID: 2011837303
Never mind I got it I was sending the selectable value incorrectly. Should be good now.