- Posts: 217
- Thank you received: 1
How to work out which cart is the users?
14 years 11 months ago #28834
by Mat
How to work out which cart is the users? was created 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.
14 years 11 months ago #28870
by nicolas
Replied by nicolas on topic Re: How to work out which cart is the users?
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.
14 years 11 months ago #28923
by Mat
Replied by Mat on topic Re: How to work out which cart is the users?
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.
14 years 11 months ago #28925
by nicolas
Replied by nicolas on topic Re: How to work out which cart is the users?
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.
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