[Skip to main content](#vessel-content)

#   Spend more to get free shipping

##

- **[eileensemporium](/forum/user/37550-eileensemporium "View eileensemporium's Profile")**
- [![eileensemporium's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/37550-eileensemporium "View eileensemporium's Profile") Topic Author
- [ Offline](/forum/user/37550-eileensemporium)

Less More

- Posts: 54
- Thank you received: 0
-
-

6 years 6 months ago [\#318180](#318180) by [eileensemporium](/forum/user/37550-eileensemporium "View eileensemporium's Profile")  *[Spend more to get free shipping](/forum/28-shipping-methods/899688-spend-more-to-get-free-shipping#318180 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3  Hello, I have my site setup and when a customer adds products to the cart and goes through the checkout process I offer various shipping options.  However I would like to provide them with information to allow them to get free shipping by purchasing more products!  As an example, e a customer purchases £8.00 worth of goods, shipping will cost £5. However if they increase their purchase above £10 then shipping would be free.  On the shipping page of the checkout process below where they select from the radio buttons for the shipping options, how can I dynamically display something along the lines of:  Spend £2 more to get free shipping.  Can I get the current variable for the total cart value? How can I access this via PHP, I have tried to echo and var&#95;dump the cart but get lost trying to locate the cart total. If I knew how to access this total cart variable I can then create something along the lines of:  $get&#95;free&#95;shipping = (10 - $cart&#95;total);  echo 'Why not spend '.$get&#95;free&#95;shipping.' more and get free shipping';  How can I get the cart total?  Thanks")* was created by *[eileensemporium](/forum/user/37550-eileensemporium "View eileensemporium's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.3

Hello,
I have my site setup and when a customer adds products to the cart and goes through the checkout process I offer various shipping options.

However I would like to provide them with information to allow them to get free shipping by purchasing more products!

As an example, e a customer purchases £8.00 worth of goods, shipping will cost £5. However if they increase their purchase above £10 then shipping would be free.

On the shipping page of the checkout process below where they select from the radio buttons for the shipping options, how can I dynamically display something along the lines of:

Spend £2 more to get free shipping.

Can I get the current variable for the total cart value? How can I access this via PHP, I have tried to echo and var_dump the cart but get lost trying to locate the cart total. If I knew how to access this total cart variable I can then create something along the lines of:

$get_free_shipping = (10 - $cart_total);

echo 'Why not spend '.$get_free_shipping.' more and get free shipping';

How can I get the cart total?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODk5Njg4LXNwZW5kLW1vcmUtdG8tZ2V0LWZyZWUtc2hpcHBpbmc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

6 years 6 months ago [\#318189](#318189) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Spend more to get free shipping](/forum/28-shipping-methods/899688-spend-more-to-get-free-shipping#318189 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3  Hello, I have my site setup and when a customer adds products to the cart and goes through the checkout process I offer various shipping options.  However I would like to provide them with information to allow them to get free shipping by purchasing more products!  As an example, e a customer purchases £8.00 worth of goods, shipping will cost £5. However if they increase their purchase above £10 then shipping would be free.  On the shipping page of the checkout process below where they select from the radio buttons for the shipping options, how can I dynamically display something along the lines of:  Spend £2 more to get free shipping.  Can I get the current variable for the total cart value? How can I access this via PHP, I have tried to echo and var&#95;dump the cart but get lost trying to locate the cart total. If I knew how to access this total cart variable I can then create something along the lines of:  $get&#95;free&#95;shipping = (10 - $cart&#95;total);  echo 'Why not spend '.$get&#95;free&#95;shipping.' more and get free shipping';  How can I get the cart total?  Thanks")*

Hi,

In the checkout / show_block_*.php files, you can get the cart total like that: Code:

$cart = $this-&gt;checkoutHelper-&gt;getCart(); $cart_total = $cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODk5Njg4LXNwZW5kLW1vcmUtdG8tZ2V0LWZyZWUtc2hpcHBpbmc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
