Skip to main content

How to work out which cart is the users?

More
14 years 11 months ago #28834 by Mat
How can I quickly work out, with php, which cart is the users?

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #28870 by nicolas
I'm not sure I understand what you want to do. Could you explain more ?

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #28923 by Mat
I was also thinking that if I could work out the cart_id I could create the user myself and load their details into hika shop directly and then just use hika shop to display this information.

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #28925 by nicolas
Once a cart has been created, it's easy to get the id of the cart of the current user.
You can do like that:
$app =& JFactory::getApplication();
$cart_id = $app->getUserStateFromRequest( 'com_hikashop.cart_id', 'cart_id', 0, 'int' );

Create yourself the cart and the infos of the user in the database is not easy though as it involves at least 7 tables.

Please Log in or Create an account to join the conversation.

Time to create page: 0.177 seconds
Powered by Kunena Forum