Minimum $ spend before checkout is allowed

  • Posts: 39
  • Thank you received: 0
8 years 11 months ago #223690

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.2.4
-- PHP version -- : 5.4.12

I need to create a mechanism that compares a users cart total to a specific amount. If their total is less than the specific amount links checkout are disabled and a redirect is triggered if they try to got to the checkout manually.

I am struggling to figure out/find what variable holds the cart total. An help as to what it is would be appreciated.

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

  • Posts: 82908
  • Thank you received: 13378
  • MODERATOR
8 years 11 months ago #223719

Hi,

You can do it like that:

$cartClass = hikashop_get('class.cart');
$cart = $cartClass->loadFullCart();
echo $cart->full_total->prices[0]->price_value_with_tax;

The following user(s) said Thank You: dda

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

  • Posts: 39
  • Thank you received: 0
8 years 11 months ago #223841

Thats what I need thanks.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum