Skip to main content

Save Cart in Hikashop Cart Class

More
3 years 3 months ago #353175 by JF
Hi,

May I know the save method for cart class?

Thanks.

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

More
3 years 3 months ago #353178 by nicolas
Hi,

You're mixing the cart object which contains only the cart data loaded in the PHP memory and the cart class which allows you to access the methods to interact with carts in the database.
You should write:
Code:
$cartClass = hikashop_get('class.cart'); $cart = $cartClass->loadFullCart($cartId); $cart->cart_coupon = '199'; $cartClass->save($cart);

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

Time to create page: 0.122 seconds
Powered by Kunena Forum