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

#   Discount code issue

##

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

Less More

- Posts: 116
- Thank you received: 7
-

11 years 2 weeks ago [\#216668](#216668) by [stratacorps](/forum/user/33546-stratacorps "View stratacorps's Profile")  *[Discount code issue](/forum/25-install-update/879740-discount-code-issue#216668 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.6.13 -- Browser(s) name and version -- : any  I have another post but haven't any resolution to this. I can reproduce the issue on your own demo site.  The problem:  1. A user visits the store, selects a product and proceed to checkout. 2. On the discount code field they enter a valid coupon/discount code. The discount is applied to the shopping cart. 3. If the shopper leaves the checkout page, adds an item to the order or changes a quantity, anything that causes the page to refresh (either by leaving it and coming back again, etc.), the discount is gone and the input box for the discount code is back again. 4. However, now you cannot enter the discount code again. Any attempt to reuse the discount/coupon code does nothing.  You have to clear all cookies from the browser session before the shopping cart is functional again. This is difficult to explain to customers and wasn't an issue in the past. We only noticed it after the update to 2.6.0 but I can not say that the issue wasn't already there in earlier versions.")* was created by *[stratacorps](/forum/user/33546-stratacorps "View stratacorps's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.6.13
-- Browser(s) name and version -- : any

I have another post but haven't any resolution to this. I can reproduce the issue on your own demo site.

The problem:

1. A user visits the store, selects a product and proceed to checkout.
2. On the discount code field they enter a valid coupon/discount code. The discount is applied to the shopping cart.
3. If the shopper leaves the checkout page, adds an item to the order or changes a quantity, anything that causes the page to refresh (either by leaving it and coming back again, etc.), the discount is gone and the input box for the discount code is back again.
4. However, now you cannot enter the discount code again. Any attempt to reuse the discount/coupon code does nothing.

You have to clear all cookies from the browser session before the shopping cart is functional again. This is difficult to explain to customers and wasn't an issue in the past. We only noticed it after the update to 2.6.0 but I can not say that the issue wasn't already there in earlier versions.

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 2 weeks ago [\#216761](#216761) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Discount code issue](/forum/25-install-update/879740-discount-code-issue#216761 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.6.13 -- Browser(s) name and version -- : any  I have another post but haven't any resolution to this. I can reproduce the issue on your own demo site.  The problem:  1. A user visits the store, selects a product and proceed to checkout. 2. On the discount code field they enter a valid coupon/discount code. The discount is applied to the shopping cart. 3. If the shopper leaves the checkout page, adds an item to the order or changes a quantity, anything that causes the page to refresh (either by leaving it and coming back again, etc.), the discount is gone and the input box for the discount code is back again. 4. However, now you cannot enter the discount code again. Any attempt to reuse the discount/coupon code does nothing.  You have to clear all cookies from the browser session before the shopping cart is functional again. This is difficult to explain to customers and wasn't an issue in the past. We only noticed it after the update to 2.6.0 but I can not say that the issue wasn't already there in earlier versions.")*

Hi,

5. That issue only happen when the user is not connected.

*The debugging continues*.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 2 weeks ago [\#216765](#216765) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Discount code issue](/forum/25-install-update/879740-discount-code-issue#216765 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.6.13 -- Browser(s) name and version -- : any  I have another post but haven't any resolution to this. I can reproduce the issue on your own demo site.  The problem:  1. A user visits the store, selects a product and proceed to checkout. 2. On the discount code field they enter a valid coupon/discount code. The discount is applied to the shopping cart. 3. If the shopper leaves the checkout page, adds an item to the order or changes a quantity, anything that causes the page to refresh (either by leaving it and coming back again, etc.), the discount is gone and the input box for the discount code is back again. 4. However, now you cannot enter the discount code again. Any attempt to reuse the discount/coupon code does nothing.  You have to clear all cookies from the browser session before the shopping cart is functional again. This is difficult to explain to customers and wasn't an issue in the past. We only noticed it after the update to 2.6.0 but I can not say that the issue wasn't already there in earlier versions.")*

Hi,

In the file "administrator/components/com_hikashop/classes/cart.php" please replace Code:

if(!isset($cart-&gt;user_id) &amp;&amp; empty($cart-&gt;cart_coupon)) $cart-&gt;cart_coupon = '';

By Code:

if(!isset($cart-&gt;cart_id) &amp;&amp; empty($cart-&gt;cart_coupon)) $cart-&gt;cart_coupon = '';

It will fix your issue.

The HikaShop 2.6.0 package would receive an update as soon as possible.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile"), [stratacorps](/forum/user/33546-stratacorps "View stratacorps's Profile")

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

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

Less More

- Posts: 116
- Thank you received: 7
-

11 years 2 weeks ago [\#216889](#216889) by [stratacorps](/forum/user/33546-stratacorps "View stratacorps's Profile")  Replied by *[stratacorps](/forum/user/33546-stratacorps "View stratacorps's Profile")* on topic *[Discount code issue](/forum/25-install-update/879740-discount-code-issue#216889 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.6.13 -- Browser(s) name and version -- : any  I have another post but haven't any resolution to this. I can reproduce the issue on your own demo site.  The problem:  1. A user visits the store, selects a product and proceed to checkout. 2. On the discount code field they enter a valid coupon/discount code. The discount is applied to the shopping cart. 3. If the shopper leaves the checkout page, adds an item to the order or changes a quantity, anything that causes the page to refresh (either by leaving it and coming back again, etc.), the discount is gone and the input box for the discount code is back again. 4. However, now you cannot enter the discount code again. Any attempt to reuse the discount/coupon code does nothing.  You have to clear all cookies from the browser session before the shopping cart is functional again. This is difficult to explain to customers and wasn't an issue in the past. We only noticed it after the update to 2.6.0 but I can not say that the issue wasn't already there in earlier versions.")*

That did it, thank you.

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

- **[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")**
- [![cpaschen's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-01-25.jpg)](/forum/user/12420-cpaschen "View cpaschen's Profile")
- [ Offline](/forum/user/12420-cpaschen)

Less More

- Posts: 196
- Thank you received: 6
-
-
-
- [](http://www.paschencommunications.com)
-

10 years 11 months ago [\#219467](#219467) by [cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")  Replied by *[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")* on topic *[Discount code issue](/forum/25-install-update/879740-discount-code-issue#219467 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.6.13 -- Browser(s) name and version -- : any  I have another post but haven't any resolution to this. I can reproduce the issue on your own demo site.  The problem:  1. A user visits the store, selects a product and proceed to checkout. 2. On the discount code field they enter a valid coupon/discount code. The discount is applied to the shopping cart. 3. If the shopper leaves the checkout page, adds an item to the order or changes a quantity, anything that causes the page to refresh (either by leaving it and coming back again, etc.), the discount is gone and the input box for the discount code is back again. 4. However, now you cannot enter the discount code again. Any attempt to reuse the discount/coupon code does nothing.  You have to clear all cookies from the browser session before the shopping cart is functional again. This is difficult to explain to customers and wasn't an issue in the past. We only noticed it after the update to 2.6.0 but I can not say that the issue wasn't already there in earlier versions.")*

This is a significant bug. I sure hope that a patch is released soon (I KNOW that I'm going to forget to make that change when I set-up HS next time .... even though I have favorited this topic ![:-)](/media/kunena/emoticons/9.png ":-)")

Thanks for the short-term fix!

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#219543](#219543) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Discount code issue](/forum/25-install-update/879740-discount-code-issue#219543 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.6.13 -- Browser(s) name and version -- : any  I have another post but haven't any resolution to this. I can reproduce the issue on your own demo site.  The problem:  1. A user visits the store, selects a product and proceed to checkout. 2. On the discount code field they enter a valid coupon/discount code. The discount is applied to the shopping cart. 3. If the shopper leaves the checkout page, adds an item to the order or changes a quantity, anything that causes the page to refresh (either by leaving it and coming back again, etc.), the discount is gone and the input box for the discount code is back again. 4. However, now you cannot enter the discount code again. Any attempt to reuse the discount/coupon code does nothing.  You have to clear all cookies from the browser session before the shopping cart is functional again. This is difficult to explain to customers and wasn't an issue in the past. We only noticed it after the update to 2.6.0 but I can not say that the issue wasn't already there in earlier versions.")*

Hi,

HikaShop 2.6.0 package has been updated few hours after the patch submission.
You can see the HikaShop build in the HikaShop configuration (Main &gt; Advanced settings) ; just after the HikaShop version number, you can see the build number.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

[](#top)
