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

#   Buy two products for £15....

##

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

Less More

- Posts: 7
- Thank you received: 0
-
-

12 years 4 months ago [\#158785](#158785) by [kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")  *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#158785 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")* was created by *[kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")*

-- url of the page with the problem -- : [ www.goldplatedhair.co.uk](http://www.goldplatedhair.co.uk)
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.1
-- Browser(s) name and version -- : All browsers
-- Error-message(debug-mod must be tuned on) -- : Error_message

My customer would like to sell two products from the same category for £15. Normal price is £8.99.
I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.

I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.

Do you know of a way I can do this?

Thanks
Kev

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 4 months ago [\#158793](#158793) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#158793 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

Hi,

What can be done is to create another coupon with other restrictions related on the desired use case.
This way, the higher coupon available will be loaded.

So if 2 products, first coupon loaded, and when adding 2 more products the second coupon will be loaded instead of the first one.

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

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

Less More

- Posts: 7
- Thank you received: 0
-
-

12 years 4 months ago [\#158911](#158911) by [kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")  Replied by *[kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#158911 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

Ok yeah that sounds feasible. Its a pretty dirty method though. Are there plans to improve this?

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

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

Less More

- Posts: 7
- Thank you received: 0
-
-

12 years 4 months ago [\#158916](#158916) by [kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")  Replied by *[kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#158916 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

So I have just tried to implement it, I was hoping it would be able to stack the different coupons that you suggested.

However, the first stumbling block was the coupons all need unique names! So I have had to create three separate coupons:

2 for £15
4 for £30
6 for £45

I added 2 items to the cart, and it used the first coupon. I added another 2 and it changed to "4 for £30" (which is not really the name of the promotion, but i'll work with it if I need to) which is expected. I didnt have enough stock to add another 2, so I ended up adding 5 of another item.

As you can see below, having 5 of the two different items in the basket doesnt work. The items are both from the same category, and the coupons are all for that specific category.

[ ](http://screencast.com/t/jFhRYAfZIW)[ screencast.com/t/jFhRYAfZIW](http://screencast.com/t/jFhRYAfZIW)

I have seen AWOCoupon will plugin and support the functionality we need, but i'm not sure its fair to advise my customer to pay for another plugin when this is a really basic fundamental requirement for an online shop?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84Njg3NTMtYnV5LXR3by1wcm9kdWN0cy1mb3ItbGIxNT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14270
-
-

12 years 4 months ago [\#158951](#158951) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#158951 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

You are probably experiencing that bug:
[ www.hikashop.com/forum/product-category-...orrectly.html#158811](http://www.hikashop.com/forum/product-category-display/868651-discounts-not-calculating-correctly.html#158811)
Please apply the patch provided there and that should fix the problem.

If you want to use AWOCoupon, no problem on that from our end. It depends on your needs.

The following user(s) said Thank You: [kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")

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

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

Less More

- Posts: 7
- Thank you received: 0
-
-

12 years 4 months ago [\#159105](#159105) by [kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")  Replied by *[kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#159105 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

Thats great thank you - its certainly a step forward. ![:)](/media/kunena/emoticons/8.png ":)")

I have 15 items in the cart in total. So not only should it apply the 6 for £45, it should also add the smaller coupons?

2 for £15
4 for £30
6 for £45

In theory, these three coupons should account for 12 items in the shopping cart.

In fact, in an ideal world, the "2 for £15" coupon should be applied 7 times, to account for 14 out of the 15 items in the cart.

Can it be tweaked to stack the coupons?

Or do I need to create dozens of iterations of coupons? ie

8 for £nn
10 for £nn
12 for £nn
14 for £nn
and so on....

If I have to create loads of coupons, can we at least remove the requirement for the Title of the coupon to be Unique? If I could call ALL of them "2 for £15"...

I appreciate the feedback so far

Many thanks
Kev

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84Njg3NTMtYnV5LXR3by1wcm9kdWN0cy1mb3ItbGIxNT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14270
-
-

12 years 4 months ago [\#159126](#159126) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#159126 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

Hi,

Only one coupon is possible per order for now in HikaShop.
Supporting multiple coupons is on our todo list for the future but not in the short term.
It's not possible to remove the unique on the coupon code. If you remove it the system will always pick the first one as the system bases itself on the coupon code in order to know which one to load.

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

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

Less More

- Posts: 7
- Thank you received: 0
-
-

12 years 4 months ago [\#159206](#159206) by [kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")  Replied by *[kevinbrown](/forum/user/32212-kevinbrown "View kevinbrown's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#159206 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

Oh, thats a shame. ![:(](/media/kunena/emoticons/5.png ":(")

The unique title could be disabled, and you could use the ID number as the unique reference. At the end of the day the title is just a label.

Could you point me in the direction of the file that needs editing to remove this check?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84Njg3NTMtYnV5LXR3by1wcm9kdWN0cy1mb3ItbGIxNT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14270
-
-

12 years 4 months ago [\#159213](#159213) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Buy two products for £15....](/forum/46-discount-coupon/868753-buy-two-products-for-lb15#159213 "-- url of the page with the problem -- :   www.goldplatedhair.co.uk  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.1 -- PHP version -- : 5.1 -- Browser(s) name and version -- : All browsers -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  My customer would like to sell two products from the same category for £15. Normal price is £8.99. I can setup an auto-coupon with a minimum qty of 2, which works fine... BUT if I put 4 items in the basket, i'd expect the coupon to be applied twice - but it only applies once.  I imagine its probably some sort of loop in the PHP code that needs amending, but wouldnt know where to start.  Do you know of a way I can do this?  Thanks Kev")*

Hi,

Basically you need to change all the code which uses the column cart_coupon of the hikashop_cart table.
I had a quick look at the code and apparently, all the code is located in the administrator/compnonents/com_hikashop/classes/cart.php on several places.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84Njg3NTMtYnV5LXR3by1wcm9kdWN0cy1mb3ItbGIxNT90bXBsPW1hcmtkb3du) 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.325 seconds

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

[](#top)
