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

Board Categories Discount &amp; Coupon

##

#  [Discount &amp; Coupon](/forum/46-discount-coupon "View Category 'Discount &amp; Coupon'")  475 topics

| Increase your sales with our coupon/discount feature |
|---|

##

| <a id="forumtop"> </a> [  ](#forumbottom) | Subject | Replies / Views | Last Post |
|---|---|---|---|
| [](/forum/46-discount-coupon/909040-max-discount-value) | [max discount value](/forum/46-discount-coupon/909040-max-discount-value "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.3 -- PHP version -- : 8.1.3 -- Browser(s) name and version -- : Chrome latest  Hi guys!  The following is my problem and the task to be solved: I need to set a maximum value for discounts per product, which overrides any preset Hikashop category discounts. What I have:  - A custom field where the value for each product is received from a CRM system (e.g., 30%). The custom field is named &quot;maxkedvezmeny.&quot; - Predefined Hikashop category discounts (e.g., the maximum discount that can be applied is 40%).  However, since not all products within the category can have a 40% discount, the system needs to consider the 30% value from the &quot;maxkedvezmeny&quot; field.  This was previously solved by a developer, and it worked, but it was deleted during a recent update.  Here is the translation:  If I am correct, I need to modify the currency.php file to override the Hikashop discount values when the &quot;maxkedvezmeny&quot; field is smaller than the discount value calculated by Hikashop.  Thanks in advance")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 1 year 9 months ago, by [mizso676](/forum/user/82243-mizso676 "View mizso676's Profile")       [Last Post](/forum/46-discount-coupon/909040-max-discount-value#365294 "Thanks for your help, I've made it through currency.php, now trying to create a plugin!") 1 year 9 months ago     by [mizso676](/forum/user/82243-mizso676 "View mizso676's Profile") | Replies:2  Views:1326 | [Last Post](/forum/46-discount-coupon/909040-max-discount-value#365294 "Thanks for your help, I've made it through currency.php, now trying to create a plugin!") by [mizso676](/forum/user/82243-mizso676 "View mizso676's Profile")      1 year 9 months ago |
| [](/forum/46-discount-coupon/908960-discount-when-5-copies-of-the-same-product-are-purchased) | [Discount when 5 copies of the same product are purchased](/forum/46-discount-coupon/908960-discount-when-5-copies-of-the-same-product-are-purchased "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.2.26  Hi, I need apply a discount of 10% when 5 copies of the same product are purchased.  Let's say:  productA price is 20€ productB price is 30€  what I want to achieve is if one purchases  - 5 x productA = 100€-10% = 90€ - 4 x productB = 120€ - total = 210€  so the discount should be applied individually for all the products in a specific category if the product is bought by 5 (or more)  How can I do that? Thanks")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 1 year 11 months ago, by [marcmarc](/forum/user/1529-marcmarc "View marcmarc's Profile")       [Last Post](/forum/46-discount-coupon/908960-discount-when-5-copies-of-the-same-product-are-purchased#364918 "Hi,  So, reading between the lines, I suppose that you also want that: - 5 x productA = 100€-10% = 90€ - 5 x productB = 150€-10% = 135€ - total = 225€ And also: - 1 x productA = 20€ - 4 x productB = 120€ - total = 140€ And also: - 6 x productA = 100€-10%+ 20€ =110€ - total = 110€  Which means: the discount quantity threshold is per product, and the discount can be cumulated with different products of that same category in the cart, and the discount quantity threshold is by steps of 5 and the discount doesn't apply to the products in between the steps.  Combining all this together with what you wrote in your message means that it is difficult to achieve everything with the discount system or the coupon system or the prices system or a combination.  With coupons, with the &quot;auto loaded in cart if possible&quot; setting activated, and product A selected in their &quot;products&quot; setting, and with min / max quantity, you could configure a 10€ coupon, a 20€ coupon, a 30€ coupon, etc so that the system could switch between the coupons of product A based on the quantity of product A in the cart. And you could configure similar coupons for each product. However, since the coupon system only supports 1 auto loaded coupon per cart, you couldn't have a coupon from product A and a coupon for product B at the same time in the cart. You could have the users manually enter coupon codes so that they would be able to add several coupons to a cart (with the multi coupon plugin in our marketplace ). But it would still require the creation of a lot of coupons. And you would have to provide the codes for each product to the customers. Not ideal.  With prices, in each product you could configure several prices with different &quot;minimum quantities&quot; and adapt the unit price to match with the total amount divided by the quantity. That would require creating one price for each quantity of each product, so not ideal either.  The best would be to develop a small plugin to calculate the discount dynamically and add it to the cart as an &quot;additional fee&quot;, similarly to what we did with the global cart fee plugin:   www.hikashop.com/marketplace/product/224-global-cart-fee.html  That way, you don't have anything to manage once the plugin is developed. But it requires a bit of initial development.") 1 year 11 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:1326 | [Last Post](/forum/46-discount-coupon/908960-discount-when-5-copies-of-the-same-product-are-purchased#364918 "Hi,  So, reading between the lines, I suppose that you also want that: - 5 x productA = 100€-10% = 90€ - 5 x productB = 150€-10% = 135€ - total = 225€ And also: - 1 x productA = 20€ - 4 x productB = 120€ - total = 140€ And also: - 6 x productA = 100€-10%+ 20€ =110€ - total = 110€  Which means: the discount quantity threshold is per product, and the discount can be cumulated with different products of that same category in the cart, and the discount quantity threshold is by steps of 5 and the discount doesn't apply to the products in between the steps.  Combining all this together with what you wrote in your message means that it is difficult to achieve everything with the discount system or the coupon system or the prices system or a combination.  With coupons, with the &quot;auto loaded in cart if possible&quot; setting activated, and product A selected in their &quot;products&quot; setting, and with min / max quantity, you could configure a 10€ coupon, a 20€ coupon, a 30€ coupon, etc so that the system could switch between the coupons of product A based on the quantity of product A in the cart. And you could configure similar coupons for each product. However, since the coupon system only supports 1 auto loaded coupon per cart, you couldn't have a coupon from product A and a coupon for product B at the same time in the cart. You could have the users manually enter coupon codes so that they would be able to add several coupons to a cart (with the multi coupon plugin in our marketplace ). But it would still require the creation of a lot of coupons. And you would have to provide the codes for each product to the customers. Not ideal.  With prices, in each product you could configure several prices with different &quot;minimum quantities&quot; and adapt the unit price to match with the total amount divided by the quantity. That would require creating one price for each quantity of each product, so not ideal either.  The best would be to develop a small plugin to calculate the discount dynamically and add it to the cart as an &quot;additional fee&quot;, similarly to what we did with the global cart fee plugin:   www.hikashop.com/marketplace/product/224-global-cart-fee.html  That way, you don't have anything to manage once the plugin is developed. But it requires a bit of initial development.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      1 year 11 months ago |
| [](/forum/46-discount-coupon/908952-create-a-specific-calculate-discount-one-shot-depending-a-previoinvoice-credit) | [Create a specific calculate discount (one shot) depending a previoinvoice credit](/forum/46-discount-coupon/908952-create-a-specific-calculate-discount-one-shot-depending-a-previoinvoice-credit "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5 -- PHP version -- : 8 -- Browser(s) name and version -- : Chrome  Hi, I would like to create programatically in my plugin a system to give a calculate discount on checkout for a customer who has an &quot;avoir (french in text) like a invoice credit&quot; from another gift - i tried to make that in my my plugin  but when i click pay button - the cart is empty as i cancelled I dont understand or i don't know why it's not easy to create a discount on subtotal or total easily Could you help me Please ?")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 1 year 11 months ago, by [bobalbax](/forum/user/36128-bobalbax "View bobalbax's Profile")       [Last Post](/forum/46-discount-coupon/908952-create-a-specific-calculate-discount-one-shot-depending-a-previoinvoice-credit#364880 "Hi,  First, your $avoir variable pops out from nowhere at the beginning of the onAfterCartProductsLoad method.  Second, I'm not sure what you mean by &quot;when i click pay button - the cart is empty as i cancelled&quot; ? Or how is it linked to custom plugin ?  Also, the &quot;discount&#95;type&quot; with the value &quot;cart&quot; doesn't exist in HikaShop. Why not use the normal &quot;discount&quot; type ? Using a non standard type might lead to some piece of code of HikaShop not properly taking into account your discount.  Finally, I would actually recommend not calculating the total yourself. There are two ways I would recommend to do it: - you could implement instead the &quot;onAfterLoadProductPriceDiscount&quot; event of HikaShop in order to inject your discount when HikaShop is loading the discounts applicable to a product. You would have to check in $rows if the objects have the cart&#95;product&#95;quantity value not empty to know whether HikaShop is asking for the discounts of the products of a cart or not. And $rows would contain all the products in the cart so you would still be able to divide the credit note (avoir) on the number of products in the cart. - Now, adding the discount to each product in the cart seems clunky to me. I would rather recommend adding an extra fee between the subtotal and the total of the cart, with the appropriate label. This can be done with the &quot;additional fee&quot; mechanism of the cart system. A relatively simple example of this is the global cart fee plugin which can be used to add extra fixed fees to carts:   www.hikashop.com/marketplace/product/224-global-cart-fee.html  A better version of this is the cart fees plugin we have on our marketplace:   www.hikashop.com/marketplace/product/279-cart-fee.html  It can add fees (or discounts if the calculated value is negative) on the fly with a dynamically calculated value and with a dynamically processed condition. In fact, if your credit note is stored in a custom field of the table &quot;user&quot; you could directly use this plugin to add the credit note to the cart of the user with zero development.") 1 year 11 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:1176 | [Last Post](/forum/46-discount-coupon/908952-create-a-specific-calculate-discount-one-shot-depending-a-previoinvoice-credit#364880 "Hi,  First, your $avoir variable pops out from nowhere at the beginning of the onAfterCartProductsLoad method.  Second, I'm not sure what you mean by &quot;when i click pay button - the cart is empty as i cancelled&quot; ? Or how is it linked to custom plugin ?  Also, the &quot;discount&#95;type&quot; with the value &quot;cart&quot; doesn't exist in HikaShop. Why not use the normal &quot;discount&quot; type ? Using a non standard type might lead to some piece of code of HikaShop not properly taking into account your discount.  Finally, I would actually recommend not calculating the total yourself. There are two ways I would recommend to do it: - you could implement instead the &quot;onAfterLoadProductPriceDiscount&quot; event of HikaShop in order to inject your discount when HikaShop is loading the discounts applicable to a product. You would have to check in $rows if the objects have the cart&#95;product&#95;quantity value not empty to know whether HikaShop is asking for the discounts of the products of a cart or not. And $rows would contain all the products in the cart so you would still be able to divide the credit note (avoir) on the number of products in the cart. - Now, adding the discount to each product in the cart seems clunky to me. I would rather recommend adding an extra fee between the subtotal and the total of the cart, with the appropriate label. This can be done with the &quot;additional fee&quot; mechanism of the cart system. A relatively simple example of this is the global cart fee plugin which can be used to add extra fixed fees to carts:   www.hikashop.com/marketplace/product/224-global-cart-fee.html  A better version of this is the cart fees plugin we have on our marketplace:   www.hikashop.com/marketplace/product/279-cart-fee.html  It can add fees (or discounts if the calculated value is negative) on the fly with a dynamically calculated value and with a dynamically processed condition. In fact, if your credit note is stored in a custom field of the table &quot;user&quot; you could directly use this plugin to add the credit note to the cart of the user with zero development.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      1 year 11 months ago |
| [](/forum/46-discount-coupon/908930-usage-of-discount) | [Usage of discount](/forum/46-discount-coupon/908930-usage-of-discount "-- url of the page with the problem -- : test.  www.horse-bodyforming.com  -- HikaShop version -- : HikaShop Business 5.1.1 &#91;2410031502&#93; -- Joomla version -- : 5.2.2  Hello, I've a problem with configuation of coupons.It doesn't work as expected.... I want to set up a coupon of 100% for one specific product - in my case it is &quot;Lammfell für Mobility Bridle&quot;. I only want to take it into account if the shopping cart has a minimum order value - in my case 150€ - and a minimum of 2 products in the shopping cart.  Please look at attachments number 1-3 Although my shopping cart has a order value about 351,84€ the system tells me that I must have a minimum order value of 150€ (screenshot 4)  When I take out the 150€ - the system tells me that my shopping cart must have a minimum number of product of 2 - althought there are 2 products in my shopping cart ....(screenshot 5)  What has to be done so that it works for my needs. BR Anita")         Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 1 year 11 months ago, by [Agabl123](/forum/user/64378-agabl123 "View Agabl123's Profile")       [Last Post](/forum/46-discount-coupon/908930-usage-of-discount#364732 "Hi,  The percentage amount will be taken off of the products linked to the coupon. And same with the restrictions. If you restrict the coupon to a product and with a minimum amount and a minimum quantity, it's the minimum amount and minimum quantity of that product in the cart which are checked.  I think that what you want to do is to not restrict the coupon to that product, and instead of entering 100% for the discount value, use the flat amount&quot; field to enter the price of that product. That way, the restrictions on the amount and quantity of the coupon will apply to the whole cart, and the discount amount applied by the coupon will be the same value as the price of the product.") 1 year 11 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:1271 | [Last Post](/forum/46-discount-coupon/908930-usage-of-discount#364732 "Hi,  The percentage amount will be taken off of the products linked to the coupon. And same with the restrictions. If you restrict the coupon to a product and with a minimum amount and a minimum quantity, it's the minimum amount and minimum quantity of that product in the cart which are checked.  I think that what you want to do is to not restrict the coupon to that product, and instead of entering 100% for the discount value, use the flat amount&quot; field to enter the price of that product. That way, the restrictions on the amount and quantity of the coupon will apply to the whole cart, and the discount amount applied by the coupon will be the same value as the price of the product.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      1 year 11 months ago |
| [](/forum/46-discount-coupon/908835-show-prices-with-discount-on-checkout) | [Show prices with discount on checkout](/forum/46-discount-coupon/908835-show-prices-with-discount-on-checkout "Hi, How can I show prices, like the product page (full price and price with discount), also in checkout page and user email? Thank you")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 1 week ago, by [nico1979](/forum/user/31330-nico1979 "View nico1979's Profile")       [Last Post](/forum/46-discount-coupon/908835-show-prices-with-discount-on-checkout#364583 "Hi,  You can edit the order / show&#95;products view file for your backend template via the menu Display&gt;Views. There, the product price with discount is displayed by this line:  You can use a similar line for the price before discount:") 1 year 11 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:3  Views:1163 | [Last Post](/forum/46-discount-coupon/908835-show-prices-with-discount-on-checkout#364583 "Hi,  You can edit the order / show&#95;products view file for your backend template via the menu Display&gt;Views. There, the product price with discount is displayed by this line:  You can use a similar line for the price before discount:") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      1 year 11 months ago |
| [](/forum/46-discount-coupon/908849-discount-e-coupon-not-working) | [Discount e Coupon not working](/forum/46-discount-coupon/908849-discount-e-coupon-not-working "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.9 -- PHP version -- : 8.3 -- Browser(s) name and version -- : chrome  Hi, when i setup a new discount or coupon, in HIKASHOP &gt; DISCOUNT, and i publish it, it doesn't work. Error is &quot;Discount not valid&quot;. A configuration screen attached, please let me know, thanks")         Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 4 days ago, by [cesco1701](/forum/user/81729-cesco1701 "View cesco1701's Profile")       [Last Post](/forum/46-discount-coupon/908849-discount-e-coupon-not-working#364370 "Hi,  That &quot;The coupon you entered is not valid&quot; message is the default message when a coupon can't be added to the cart and no error has been returned. This normally should not happen as HikaShop returns an error message specific for each check it does. However, plugins can also refuse the coupon, and they can potentially skip on providing an error message. Do you use a plugin related to coupons / discounts ? Like AWOCoupon, or our Multicoupon plugin ? Otherwise, it could also happen with a database issue. Try to use the &quot;check database&quot; button of the HikaShop configuration. It might help.") 2 years 3 days ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:1182 | [Last Post](/forum/46-discount-coupon/908849-discount-e-coupon-not-working#364370 "Hi,  That &quot;The coupon you entered is not valid&quot; message is the default message when a coupon can't be added to the cart and no error has been returned. This normally should not happen as HikaShop returns an error message specific for each check it does. However, plugins can also refuse the coupon, and they can potentially skip on providing an error message. Do you use a plugin related to coupons / discounts ? Like AWOCoupon, or our Multicoupon plugin ? Otherwise, it could also happen with a database issue. Try to use the &quot;check database&quot; button of the HikaShop configuration. It might help.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 3 days ago |
| [](/forum/46-discount-coupon/908772-plugin-multicoupon-affichage-coupon-sur-facture-et-commande-backend) | [Plugin multicoupon - Affichage coupon sur facture et commande backend](/forum/46-discount-coupon/908772-plugin-multicoupon-affichage-coupon-sur-facture-et-commande-backend "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.2  Bonjour,  Après avoir utilisé le plugin multicoupon depuis quelques semaines, je me permets de vous remonter 2 infos à corriger:  - Lorsque j'ajoute la colonne &quot;coupon&quot; ou &quot;valeur du coupon&quot; en fenêtre de commandes dans le backend, la valeur est toujours nulle ou inexistante même si la cliente a utilisé un coupon lors de ses achats. - Lorsque je génère une facture, le coupon ne s'affiche plus sur le document.  J'imagine que cela a un lien avec le fait que le coupon lié au plugin multicoupon soit hikashop&#95;order&#95;additional&#95;additional et plus hikashop&#95;order&#95;additional&#95;coupon  Merci d'avance pour votre aide!  Stéphanie")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 4 weeks ago, by [info@lerenardquitrace.be](/forum/user/59029-info-lerenardquitrace-be "View info@lerenardquitrace.be's Profile")       [Last Post](/forum/46-discount-coupon/908772-plugin-multicoupon-affichage-coupon-sur-facture-et-commande-backend#364008 "Merci pour la réponse rapide. On avait un override et on vient de le modifier pour que les coupons apparaissent sur les factures.  Tout est en ordre.  Bonne journée!") 2 years 3 weeks ago     by [info@lerenardquitrace.be](/forum/user/59029-info-lerenardquitrace-be "View info@lerenardquitrace.be's Profile") | Replies:2  Views:1253 | [Last Post](/forum/46-discount-coupon/908772-plugin-multicoupon-affichage-coupon-sur-facture-et-commande-backend#364008 "Merci pour la réponse rapide. On avait un override et on vient de le modifier pour que les coupons apparaissent sur les factures.  Tout est en ordre.  Bonne journée!") by [info@lerenardquitrace.be](/forum/user/59029-info-lerenardquitrace-be "View info@lerenardquitrace.be's Profile")      2 years 3 weeks ago |
| [](/forum/46-discount-coupon/908755-why-coupon-auto-loads-the-lower-value-at-cart) | [Why coupon auto loads the lower value at cart?](/forum/46-discount-coupon/908755-why-coupon-auto-loads-the-lower-value-at-cart "-- HikaShop version -- : 5.0.4 -- Joomla version -- : 4.4.4 -- PHP version -- : 7.3.33 -- Browser(s) name and version -- : Chrome  I have 2 products, same price.  Product One is set for RM20 discount (min qty 2). Product Two is set for RM25 discount (min qty 2).  But why is RM20 coupon discount auto-loaded instead?  If i remember correctly, the cart autoloads the higher value coupon. Is that not so?")         Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 1 month ago, by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")       [Last Post](/forum/46-discount-coupon/908755-why-coupon-auto-loads-the-lower-value-at-cart#363909 "Hi,  In general that is the case. But saying that is a simplification of what really happens behind the scenes. In practice, knowing which autoloaded coupon has the bigger value is difficult. That's because you can either configure the coupon with a fixed amount or a percentage. And then system cannot efficiently calculate the real value of the coupons before comparing them as that would require calculating the value for each auto loaded coupon before running the comparison algorithm. So, to make it easier, the system compare the coupons first based on their &quot;order value from&quot; and if it is the same value, the &quot;product quantity from&quot; value. Usually, either of them is set differently and it works fine. In your case, you didn't set any &quot;order value from&quot; and set the &quot;product quantity from&quot; to the same value of &quot;2&quot;. So there is no real ordering and the system picks up the first one it finds.  So, this means two things can be done: - on your end, you could set the value of the coupon in the &quot;order value from&quot; and it would work like you want. - on our end, we could add the coupon flat value as a last determining factor for the sorting so that in your case, it would properly select the correct coupon. We'll look at adding this on our end for the next version of HikaShop.") 2 years 1 month ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:1291 | [Last Post](/forum/46-discount-coupon/908755-why-coupon-auto-loads-the-lower-value-at-cart#363909 "Hi,  In general that is the case. But saying that is a simplification of what really happens behind the scenes. In practice, knowing which autoloaded coupon has the bigger value is difficult. That's because you can either configure the coupon with a fixed amount or a percentage. And then system cannot efficiently calculate the real value of the coupons before comparing them as that would require calculating the value for each auto loaded coupon before running the comparison algorithm. So, to make it easier, the system compare the coupons first based on their &quot;order value from&quot; and if it is the same value, the &quot;product quantity from&quot; value. Usually, either of them is set differently and it works fine. In your case, you didn't set any &quot;order value from&quot; and set the &quot;product quantity from&quot; to the same value of &quot;2&quot;. So there is no real ordering and the system picks up the first one it finds.  So, this means two things can be done: - on your end, you could set the value of the coupon in the &quot;order value from&quot; and it would work like you want. - on our end, we could add the coupon flat value as a last determining factor for the sorting so that in your case, it would properly select the correct coupon. We'll look at adding this on our end for the next version of HikaShop.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 1 month ago |
| [](/forum/46-discount-coupon/908708-how-to-add-a-coupon-only-for-main-price-when-using-volume-prices) | [How to add a coupon only for main price when using volume prices?](/forum/46-discount-coupon/908708-how-to-add-a-coupon-only-for-main-price-when-using-volume-prices "-- HikaShop version -- : 5.1.1 -- Joomla version -- : 5.1.4 -- PHP version -- : 8.2  Hello guys, Is there any way to applay this restriction now? So I have &quot;Product 1&quot; price 20$ If quantity is 5 price is 16$ If quantity is 10 price is 14$ And now, I want to create a discount or coupon that applay only for the main price. The discount / coupon has a -2$ flat. If I create a discount, not all volume prices should be cut &#91;strike&#93;20$&#91;/strike&#93; 18$ &#91;strike&#93;16$&#91;/strike&#93; 14$ not like this &#91;strike&#93;14&#91;/strike&#93; 12$ not like this =========================== &#91;strike&#93;20$&#91;/strike&#93; 18$ 16$ ok 14$ ok =========================== Is not ok to create the discount or the coupon with the limit on max qty 4, because that limitation it is applied to the entire cart, so if I have 5 different products, my discount is not gonna be applied anymore. Also, is no ok to create a discount for each product.  So you think that this can be made as a plugin, or a new feature in hikashop? If you think that it can be done as a plugin, can you show me the starting point? :D")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 1 month ago, by [oxido](/forum/user/29793-oxido "View oxido's Profile")       [Last Post](/forum/46-discount-coupon/908708-how-to-add-a-coupon-only-for-main-price-when-using-volume-prices#363705 "Hi,  There is no option for that, but it can definitely be done as a plugin.  First, we have documentation about creating plugins for Joomla / HikaShop in general here:   www.hikashop.com/support/documentation/6...mentation.html#intro  If you're not familiar with this, I would recommend looking at this first.  I think the best is to implement the event onAfterCartProductsLoad of the cart API:   www.hikashop.com/support/documentation/6...fterCartProductsLoad  This event is triggered each time a cart is being loaded. You'll have most of the information about the cart in the one and only parameter of the event $cart, including an array of the product objects in $cart-&gt;products So you can loop on that array in order to check which products are in the cart and the quantity of the product in the cart ( in the attribute cart&#95;product&#95;quantity ). That way, you can calculate how much you want to give as a discount with whatever rules you need to apply. Once you know the amount, you can add it to the cart:  This mechanism of additional fees is used by several plugins, like the &quot;multi coupon plugin&quot;, the &quot;cart fee plugin&quot; or the &quot;global cart fee plugin&quot; (this one is free, you can easily look at its code if you want) which are available in our marketplace.") 2 years 1 month ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:1267 | [Last Post](/forum/46-discount-coupon/908708-how-to-add-a-coupon-only-for-main-price-when-using-volume-prices#363705 "Hi,  There is no option for that, but it can definitely be done as a plugin.  First, we have documentation about creating plugins for Joomla / HikaShop in general here:   www.hikashop.com/support/documentation/6...mentation.html#intro  If you're not familiar with this, I would recommend looking at this first.  I think the best is to implement the event onAfterCartProductsLoad of the cart API:   www.hikashop.com/support/documentation/6...fterCartProductsLoad  This event is triggered each time a cart is being loaded. You'll have most of the information about the cart in the one and only parameter of the event $cart, including an array of the product objects in $cart-&gt;products So you can loop on that array in order to check which products are in the cart and the quantity of the product in the cart ( in the attribute cart&#95;product&#95;quantity ). That way, you can calculate how much you want to give as a discount with whatever rules you need to apply. Once you know the amount, you can add it to the cart:  This mechanism of additional fees is used by several plugins, like the &quot;multi coupon plugin&quot;, the &quot;cart fee plugin&quot; or the &quot;global cart fee plugin&quot; (this one is free, you can easily look at its code if you want) which are available in our marketplace.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 1 month ago |
| [](/forum/46-discount-coupon/908564-un-produit-achete-un-produit-offert) | [Un produit acheté, un produit offert](/forum/46-discount-coupon/908564-un-produit-achete-un-produit-offert "-- url of the page with the problem -- :   www.junoa.fr/  -- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.8  Bonjour,  Nous vendons des affiches avec une boutique Hikashop.  Lors d'une promotion, nous souhaitons que lorsqu'un utilisateur achète une affiche il puisse en choisir une seconde de son choix gratuitement parmi l'ensemble des affiches en vente.  Comment pouvons-nous mettre cela en place ?  D'avance merci de votre réponse :-)")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 2 months ago, by [cb75ter](/forum/user/7364-cb75ter "View cb75ter's Profile")       [Last Post](/forum/46-discount-coupon/908564-un-produit-achete-un-produit-offert#363051 "Bonjour Nicolas,  Merci pour cette réponse précise. Elle devrait suffire pour faire ce dont nous avons besoin actuellement. Nous pourrons en effet et éventuellement développer un plugin si nous devions aller plus loin.  Merci encore.") 2 years 2 months ago     by [cb75ter](/forum/user/7364-cb75ter "View cb75ter's Profile") | Replies:4  Views:1181 | [Last Post](/forum/46-discount-coupon/908564-un-produit-achete-un-produit-offert#363051 "Bonjour Nicolas,  Merci pour cette réponse précise. Elle devrait suffire pour faire ce dont nous avons besoin actuellement. Nous pourrons en effet et éventuellement développer un plugin si nous devions aller plus loin.  Merci encore.") by [cb75ter](/forum/user/7364-cb75ter "View cb75ter's Profile")      2 years 2 months ago |
| [](/forum/46-discount-coupon/908503-coupon-free-product-plugin-causes-checkout-error) | [Coupon Free Product Plugin Causes Checkout Error](/forum/46-discount-coupon/908503-coupon-free-product-plugin-causes-checkout-error "-- url of the page with the problem -- :   hatsukoi.co.uk/freetest/  -- HikaShop version -- : 5.1.0 -- Joomla version -- : 5.1.2 -- PHP version -- : 8.2  Hi there  I just purchased the Coupon Free Product plugin to add a free item with a coupon code.  It all seemed to work OK until I noticed that if you come out of the checkout and then try to go back using the basket link, it causes a fatal error.  I am working this test site:   hatsukoi.co.uk/freetest/  You can add any items to the basket and then use the code FREE at the checkout to load the free product. However, if you click on the mini basket module, for example if you look at another product, you then get the red fatal error screen (attached).  I don't have an override for that module so I wonder if there is something else causing the error... The only thing I can think of that might be strange about the free product is that its category is outside of 'product category' and is directly under 'root'.  I'd be grateful if you could let me know if you think I'm doing something wrong at this end?  Many thanks Leila")         Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 3 months ago, by [Leilahodgkins](/forum/user/5728-leilahodgkins "View Leilahodgkins's Profile")       [Last Post](/forum/46-discount-coupon/908503-coupon-free-product-plugin-causes-checkout-error#362656 "Hi Philip  That fixed it! I updated the GA4 plugin and it all works well now. Many thanks for your help with that, I really appreciate it.  Best wishes Leila") 2 years 3 months ago     by [Leilahodgkins](/forum/user/5728-leilahodgkins "View Leilahodgkins's Profile") | Replies:2  Views:1139 | [Last Post](/forum/46-discount-coupon/908503-coupon-free-product-plugin-causes-checkout-error#362656 "Hi Philip  That fixed it! I updated the GA4 plugin and it all works well now. Many thanks for your help with that, I really appreciate it.  Best wishes Leila") by [Leilahodgkins](/forum/user/5728-leilahodgkins "View Leilahodgkins's Profile")      2 years 3 months ago |
| [](/forum/46-discount-coupon/908255-using-coupon-codes) | [Using Coupon codes](/forum/46-discount-coupon/908255-using-coupon-codes "-- url of the page with the problem -- :   framemaker.dk/en/shop  -- HikaShop version -- : 5.0.4 -- Joomla version -- : Joomla! 3.10.12 -- PHP version -- : 7.3.33 -- Browser(s) name and version -- : Firefox  I have an ecommerce partner who wants to use my products as give aways. He asks whether I can generate a number of unique coupon codes to give away. The coupon codes must be &quot;use once only&quot;, in order to avoid them being distributed. I can see that there is one provider of a coupon code plugin for Hikashop. Does anybody know whether that will work in the manner I envision?  Best regards Bjørn Smalbro")         Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 5 months ago, by [framemaker](/forum/user/61181-framemaker "View framemaker's Profile")       [Last Post](/forum/46-discount-coupon/908255-using-coupon-codes#361784 "Hi,  No worries. For anyone else reading this thread, instead of using CSS code to hide the coupon area, I would rather recommend removing the &quot;coupon&quot; view from the &quot;Checkout workflow&quot;. It's a lot cleaner and it will be easier to add back if necessary in the future.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:17  Views:2154 | [Last Post](/forum/46-discount-coupon/908255-using-coupon-codes#361784 "Hi,  No worries. For anyone else reading this thread, instead of using CSS code to hide the coupon area, I would rather recommend removing the &quot;coupon&quot; view from the &quot;Checkout workflow&quot;. It's a lot cleaner and it will be easier to add back if necessary in the future.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |
| [](/forum/46-discount-coupon/908231-discount-advanced-restrictions-more-discounts) | [Discount Advanced Restrictions + More discounts](/forum/46-discount-coupon/908231-discount-advanced-restrictions-more-discounts "-- HikaShop version -- : 5.0.4 -- Joomla version -- : 5.1.1 -- PHP version -- : 8.2.19  Hello,  First question: ----- In Coupons / Advanced Restrictions -&gt; there are included: - Order value from / to - Product quantity from / to  Unfortunatelly - This is missed for Discounts ...I suppose the only way, is to use coupons with &quot;Auto load in cart if possible&quot;.  Right?  Second question: ----- There is not possible to apply more than 1 discount at the same time for category or product In marketplace I found &quot;Multi Coupon Checkout&quot; - bot nothing to apply multi discounts.  Is there a wqay to apply more discounts at the same time to category or product?  Note - this is important if I would like to add some extra discounts to special group of the customers.")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 5 months ago, by [Pajerchin](/forum/user/20592-pajerchin "View Pajerchin's Profile")       [Last Post](/forum/46-discount-coupon/908231-discount-advanced-restrictions-more-discounts#361345 "Hello,  You see me sorry to tell you, that unless a large and expensive custom, there is not really a solution to have say for example, 3 discounts which can be superimposed or not depending on the user group. Really sorry for this feedback.  Regards") 2 years 5 months ago     by [Philip](/forum/user/34318-philip "View Philip's Profile") | Replies:3  Views:778 | [Last Post](/forum/46-discount-coupon/908231-discount-advanced-restrictions-more-discounts#361345 "Hello,  You see me sorry to tell you, that unless a large and expensive custom, there is not really a solution to have say for example, 3 discounts which can be superimposed or not depending on the user group. Really sorry for this feedback.  Regards") by [Philip](/forum/user/34318-philip "View Philip's Profile")      2 years 5 months ago |
| [](/forum/46-discount-coupon/908149-discounts-and-coupons) | [Discounts and Coupons](/forum/46-discount-coupon/908149-discounts-and-coupons "-- HikaShop version -- : 5.0.4 -- Joomla version -- : 4.4.3 -- PHP version -- : 7.4 -- Browser(s) name and version -- : Chrome  Hi, I have been testing around with discounts and coupons and it seems straight forward on how to apply to products and the checkout part.  In our country, we give 20% discount to senior citizens who are over the age of 60 for essential products like food, health services, etc.  So, I created a coupon code called &quot;SENIOR&quot; so the customers can avail of the discount when they check out. However, there are times when a certain product is on sale and the price is already discounted. We want to prevent senior buyers from availing the coupon discount if a product is already discounted.  I would appreciate any suggestion on how to do go about it. Thank you so much.")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 6 months ago, by [junpaglin](/forum/user/81733-junpaglin "View junpaglin's Profile")       [Last Post](/forum/46-discount-coupon/908149-discounts-and-coupons#360914 "Thank you for the suggestion. Will test it out.") 2 years 6 months ago     by [junpaglin](/forum/user/81733-junpaglin "View junpaglin's Profile") | Replies:2  Views:754 | [Last Post](/forum/46-discount-coupon/908149-discounts-and-coupons#360914 "Thank you for the suggestion. Will test it out.") by [junpaglin](/forum/user/81733-junpaglin "View junpaglin's Profile")      2 years 6 months ago |
| [](/forum/46-discount-coupon/907822-coupons-that-auto-increase-value-on-purchase-amount) | [Coupons that auto increase value on purchase amount](/forum/46-discount-coupon/907822-coupons-that-auto-increase-value-on-purchase-amount "Hi,  Will it be possible to make coupons in a way where they start at for instance: 5 euro flat amount - starting from order value 200,- 10 euro flat amount - starting from order value 400,- etc? So that my affiliates only need 1 coupon instead of multiple? Kind regards.")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 8 months ago, by [NicoW](/forum/user/58228-nicow "View NicoW's Profile")       [Last Post](/forum/46-discount-coupon/907822-coupons-that-auto-increase-value-on-purchase-amount#359415 "Perfect, thank you.") 2 years 8 months ago     by [NicoW](/forum/user/58228-nicow "View NicoW's Profile") | Replies:2  Views:727 | [Last Post](/forum/46-discount-coupon/907822-coupons-that-auto-increase-value-on-purchase-amount#359415 "Perfect, thank you.") by [NicoW](/forum/user/58228-nicow "View NicoW's Profile")      2 years 8 months ago |
| [](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount) | [Can not add more than 60 products to discount](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.15  When adding products to discount (advanced restrictions), I can only add 60 products. Is there a limit? How to increase it?")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 8 months ago, by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")       [Last Post](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount#359229 "Great. Working.") 2 years 8 months ago     by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile") | Replies:4  Views:715 | [Last Post](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount#359229 "Great. Working.") by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")      2 years 8 months ago |
| [](/forum/46-discount-coupon/907660-plugins-hikashop-discount-coutdown) | [Plugins: HikaShop - Discount Coutdown](/forum/46-discount-coupon/907660-plugins-hikashop-discount-coutdown "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 5.0.2 -- PHP version -- : 8.1 -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : hi i want edit or display : none Limited time discount  hi  1 - When I use the plugin Plugins: HikaShop - Discount Coutdown We want to change or delete the Limited time discount text 2 - When I use the plugin Plugins: HikaShop - Discount Coutdown I can't display the time for the product itself, it only shows the time for the modules.")         Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 9 months ago, by [decor](/forum/user/80295-decor "View decor's Profile")       [Last Post](/forum/46-discount-coupon/907660-plugins-hikashop-discount-coutdown#359046 "Hello,  Please re-download the discount countdown plugin. The feature was already in the plugin but the value was not available in the XML (for Joomla).  Regards,") 2 years 9 months ago     by [Jerome](/forum/user/80-jerome "View Jerome's Profile") | Replies:17  Views:974 | [Last Post](/forum/46-discount-coupon/907660-plugins-hikashop-discount-coutdown#359046 "Hello,  Please re-download the discount countdown plugin. The feature was already in the plugin but the value was not available in the XML (for Joomla).  Regards,") by [Jerome](/forum/user/80-jerome "View Jerome's Profile")      2 years 9 months ago |
| [](/forum/46-discount-coupon/907521-promotional-coupon) | [Promotional coupon](/forum/46-discount-coupon/907521-promotional-coupon "Hello, Is there a way to create a coupon that doesn't affect the vendor's cost? For example, we have a vendor with a product for $100 And we want to create a $20 coupon so that buyers buy the product for $80 and the vendor gets $100.(To encourage vendors to make more efforts to attract customers) how to do that?")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 10 months ago, by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")       [Last Post](/forum/46-discount-coupon/907521-promotional-coupon#357988 "Hello,  As long as the coupon target one specific vendor, it will apply its discount only on the targeted vendor's products. Afterwards, and depending how your products are organized, you can still use the HikaShop &quot;category restriction&quot; on the coupon/discount which can also be useful to target only products of specific vendors (as long as the &quot;vendor root category&quot; is configured and used)  Regards,") 2 years 10 months ago     by [Jerome](/forum/user/80-jerome "View Jerome's Profile") | Replies:3  Views:780 | [Last Post](/forum/46-discount-coupon/907521-promotional-coupon#357988 "Hello,  As long as the coupon target one specific vendor, it will apply its discount only on the targeted vendor's products. Afterwards, and depending how your products are organized, you can still use the HikaShop &quot;category restriction&quot; on the coupon/discount which can also be useful to target only products of specific vendors (as long as the &quot;vendor root category&quot; is configured and used)  Regards,") by [Jerome](/forum/user/80-jerome "View Jerome's Profile")      2 years 10 months ago |
| [](/forum/46-discount-coupon/907530-what-is-right-way-i-show-coupon-badge-on-my-own-component-records) | [what is right way i show coupon badge on my own component records?](/forum/46-discount-coupon/907530-what-is-right-way-i-show-coupon-badge-on-my-own-component-records "hi. i create my own component and show my record and user do some process and finally go to hikashop to checkout process. i want show badge on my own component object (each record separately) which this record has or has not coupon. 1-can you give me sample code or any advise to look some php file as a pattern? (yes i can query to hikashop discount table but i want use safe way) 2- is there any way to use some setting to show some coupon and hide some of that? for example i want add yes/no option to my vendor discount/add page, for when my vendor want to create a coupon if he want show his coupon then select yes or if he don't want show as a public , then he select no. i have an answer to my question but i want understand your answer maybe you give me better or maybe correct me: 1- i must change HikaMarket - discountmarket / show.php to add &quot;show coupon to public: yes/no&quot;, 2- add appropriate column to hikashop discount table. am i right? thank you")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 10 months ago, by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")       [Last Post](/forum/46-discount-coupon/907530-what-is-right-way-i-show-coupon-badge-on-my-own-component-records#357981 "Hi,  1. I indeed think you want to directly run a MySQL query to the hikashop&#95;discount table in order to adapt it to your needs. Loading of the coupons data is done in the file administrator/components/com&#95;hikashop/classes/discount.php In there, the load function loads the data of a coupon, and the check function checks that a coupon is allowed to be used.  2. Yes, you want to customize the disocuntmarket / show.php view file to add the HTML for the extra option. However, you'll also need to implement the onBeforeDiscountCreate and onBeforeDiscountUpdate events in a plugin of the group &quot;hikashop&quot; in order to add the selection done by the user in that setting to the discount object being saved. And yes, you'll also need to add the appropriate column to the hikashop&#95;discount table. Finally, in your plugin, you also need to implement the onBeforeCouponCheck event to check the extra setting in order to make sure the coupon can be used. If not, you want to set the $do variable to false and the text of the error message to be displayed to the customer in the $error&#95;message variable.  You can read more about all of these events here:   www.hikashop.com/support/documentation/6...entation.html#coupon") 2 years 10 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:810 | [Last Post](/forum/46-discount-coupon/907530-what-is-right-way-i-show-coupon-badge-on-my-own-component-records#357981 "Hi,  1. I indeed think you want to directly run a MySQL query to the hikashop&#95;discount table in order to adapt it to your needs. Loading of the coupons data is done in the file administrator/components/com&#95;hikashop/classes/discount.php In there, the load function loads the data of a coupon, and the check function checks that a coupon is allowed to be used.  2. Yes, you want to customize the disocuntmarket / show.php view file to add the HTML for the extra option. However, you'll also need to implement the onBeforeDiscountCreate and onBeforeDiscountUpdate events in a plugin of the group &quot;hikashop&quot; in order to add the selection done by the user in that setting to the discount object being saved. And yes, you'll also need to add the appropriate column to the hikashop&#95;discount table. Finally, in your plugin, you also need to implement the onBeforeCouponCheck event to check the extra setting in order to make sure the coupon can be used. If not, you want to set the $do variable to false and the text of the error message to be displayed to the customer in the $error&#95;message variable.  You can read more about all of these events here:   www.hikashop.com/support/documentation/6...entation.html#coupon") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 10 months ago |
| [](/forum/46-discount-coupon/907523-copoun-can-not-use-if-user-go-to-payment-gateway) | [copoun can not use if user go to payment gateway](/forum/46-discount-coupon/907523-copoun-can-not-use-if-user-go-to-payment-gateway "hi. imagine i create a coupon from admin Quota= 1 if user 1 add coupon to his cart and go to gateway but cancel his purchase and don't pay, then user 2 can not use that coupon. is it logic or i have some mistake?")        Category: [Discount &amp; Coupon](/forum/46-discount-coupon "Increase your sales with our coupon/discount feature")     Topic started 2 years 10 months ago, by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")       [Last Post](/forum/46-discount-coupon/907523-copoun-can-not-use-if-user-go-to-payment-gateway#357943 "Hi,  That's normal as you don't want other users to use the same coupon on other orders. However, if the created order's status is changed to &quot;cancelled&quot;, then the coupon quota will be available again for other users. If the user clicks on the &quot;cancel and go back to merchant&quot; link on the payment gateway, then the order will be cancelled. If the user just closes the tab once redirected to the payment gateway, the order will stay created. In that case, you have the &quot;order auto cancel&quot; plugin you can configure so that after a while, the created orders are cancelled automatically, and the coupon will be available again.") 2 years 10 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:1  Views:858 | [Last Post](/forum/46-discount-coupon/907523-copoun-can-not-use-if-user-go-to-payment-gateway#357943 "Hi,  That's normal as you don't want other users to use the same coupon on other orders. However, if the created order's status is changed to &quot;cancelled&quot;, then the coupon quota will be available again for other users. If the user clicks on the &quot;cancel and go back to merchant&quot; link on the payment gateway, then the order will be cancelled. If the user just closes the tab once redirected to the payment gateway, the order will stay created. In that case, you have the &quot;order auto cancel&quot; plugin you can configure so that after a while, the created orders are cancelled automatically, and the coupon will be available again.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 10 months ago |
| <a id="forumbottom"> </a> [   ](#forumtop) |  |

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

Time to create page: 0.052 seconds

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