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

#   Strange behaviour with coupon

##

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

Less More

- Posts: 9
- Thank you received: 0
-
-

15 years 11 months ago [\#2601](#2601) by [Chris](/forum/user/377-chris "View Chris's Profile")  *[Strange behaviour with coupon](/forum/3-bug-report/2601-strange-behaviour-with-coupon#2601 "I want to use the coupon facility on my website, but I find the behaviour totally confusing. I can just imagine how some customers may be confused. These are the problems:  1. This is a serious problem: when I click on the remove product button in the checkout, I am redirected to my local server on my PC where I developed the site! Is this a browser problem or a HikaShop problem? I use Firefox 3.6.12.  2. When the coupon code is added before selecting shipping or payment method, the coupon value is displayed under Total price, but the default shipping cost disappears. I have to click on Next to see the shipping cost again.  3. When the shipping mode is changed, followed by the coupon code being entered, the behaviour is even more erratic. Sometimes the shipping cost is displayed, other times the coupon value. When Next is clicked in the hope to see the updated price, the order is processed and either the shipping cost or the coupon value is left out.  Please could someone play around on my site and tell me what's going on. I have spent days now to upload about 150 products, but there is no way that I can start marketing my products if this is the kind of behaviour that my customers will have to face.  My site is at")* was created by *[Chris](/forum/user/377-chris "View Chris's Profile")*

I want to use the coupon facility on my website, but I find the behaviour totally confusing. I can just imagine how some customers may be confused. These are the problems:

1. This is a serious problem: when I click on the remove product button in the checkout, I am redirected to my local server on my PC where I developed the site! Is this a browser problem or a HikaShop problem? I use Firefox 3.6.12.

2. When the coupon code is added before selecting shipping or payment method, the coupon value is displayed under Total price, but the default shipping cost disappears. I have to click on Next to see the shipping cost again.

3. When the shipping mode is changed, followed by the coupon code being entered, the behaviour is even more erratic. Sometimes the shipping cost is displayed, other times the coupon value. When Next is clicked in the hope to see the updated price, the order is processed and either the shipping cost or the coupon value is left out.

Please could someone play around on my site and tell me what's going on. I have spent days now to upload about 150 products, but there is no way that I can start marketing my products if this is the kind of behaviour that my customers will have to face.

My site is at [ ](http://thulutess.com)[ www.thulutess.com](http://www.thulutess.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8yNjAxLXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtY291cG9uP3RtcGw9bWFya2Rvd24=) 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: 86358
- Thank you received: 14293
-
-

15 years 11 months ago [\#2602](#2602) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Strange behaviour with coupon](/forum/3-bug-report/2601-strange-behaviour-with-coupon#2602 "I want to use the coupon facility on my website, but I find the behaviour totally confusing. I can just imagine how some customers may be confused. These are the problems:  1. This is a serious problem: when I click on the remove product button in the checkout, I am redirected to my local server on my PC where I developed the site! Is this a browser problem or a HikaShop problem? I use Firefox 3.6.12.  2. When the coupon code is added before selecting shipping or payment method, the coupon value is displayed under Total price, but the default shipping cost disappears. I have to click on Next to see the shipping cost again.  3. When the shipping mode is changed, followed by the coupon code being entered, the behaviour is even more erratic. Sometimes the shipping cost is displayed, other times the coupon value. When Next is clicked in the hope to see the updated price, the order is processed and either the shipping cost or the coupon value is left out.  Please could someone play around on my site and tell me what's going on. I have spent days now to upload about 150 products, but there is no way that I can start marketing my products if this is the kind of behaviour that my customers will have to face.  My site is at")*

Hi,

1. It's probably because of the URL you entered in the field "URL where to redirect when the cart is empty" in the tab display of the configuration. Please make sure that if you change the website address, you also update that URL.

2&amp;3. Could you try to add the code Code:

if(empty($shipping_id) &amp;&amp; count($usable_rates)){ $rate = reset($usable_rates); $app-&gt;setUserState( HIKASHOP_COMPONENT.'.shipping_data',$rate); $app-&gt;setUserState( HIKASHOP_COMPONENT.'.shipping_id',$rate-&gt;shipping_id ); $app-&gt;setUserState( HIKASHOP_COMPONENT.'.shipping_method',$rate-&gt;shipping_type ); $order-&gt;shipping = $rate; $shipping =&amp; $order-&gt;shipping; $shippings = array(&amp;$shipping); $currencyClass-&gt;processShippings($shippings); //calculate total price with shipping $currencyClass-&gt;addShipping($order-&gt;shipping,$order-&gt;full_total); $order-&gt;full_total=&amp;$order-&gt;shipping-&gt;total; }

after the code Code:

$currencyClass-&gt;processShippings($usable_rates); $shipping_method=$app-&gt;getUserState( HIKASHOP_COMPONENT.'.shipping_method' ); $shipping_id=$app-&gt;getUserState( HIKASHOP_COMPONENT.'.shipping_id' );

in the file components/com_hikashop/views/checkout/view.html.php in the function shipping ? That's something we already added locally and it seems to solve the problem.

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

15 years 11 months ago [\#2608](#2608) by [Chris](/forum/user/377-chris "View Chris's Profile")  Replied by *[Chris](/forum/user/377-chris "View Chris's Profile")* on topic *[Re: Strange behaviour with coupon](/forum/3-bug-report/2601-strange-behaviour-with-coupon#2608 "I want to use the coupon facility on my website, but I find the behaviour totally confusing. I can just imagine how some customers may be confused. These are the problems:  1. This is a serious problem: when I click on the remove product button in the checkout, I am redirected to my local server on my PC where I developed the site! Is this a browser problem or a HikaShop problem? I use Firefox 3.6.12.  2. When the coupon code is added before selecting shipping or payment method, the coupon value is displayed under Total price, but the default shipping cost disappears. I have to click on Next to see the shipping cost again.  3. When the shipping mode is changed, followed by the coupon code being entered, the behaviour is even more erratic. Sometimes the shipping cost is displayed, other times the coupon value. When Next is clicked in the hope to see the updated price, the order is processed and either the shipping cost or the coupon value is left out.  Please could someone play around on my site and tell me what's going on. I have spent days now to upload about 150 products, but there is no way that I can start marketing my products if this is the kind of behaviour that my customers will have to face.  My site is at")*

Hi Nicolas

My apology - problem 1 was an oversight on my part.

As for the added code, the problems are still there. When I arrive at the checkout page and select a different shipping method, then enter a coupon code, only the new shipping price shows after I click on Add, but the coupon field is still open and no coupon value shows in the price. Clicking on Next completes the transaction.

If I change the shipping method only and click Next, the new shipping price shows, as expected. If I now add a coupon code, the transaction is immediately completed when I click Add, instead of showing the updated price with the coupon discount. In this case the coupon value is also not deducted from the total price.

I'll experiment with the checkout workflow - perhaps I can eliminate some of these issues.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8yNjAxLXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtY291cG9uP3RtcGw9bWFya2Rvd24=) 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: 86358
- Thank you received: 14293
-
-

15 years 11 months ago [\#2630](#2630) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Strange behaviour with coupon](/forum/3-bug-report/2601-strange-behaviour-with-coupon#2630 "I want to use the coupon facility on my website, but I find the behaviour totally confusing. I can just imagine how some customers may be confused. These are the problems:  1. This is a serious problem: when I click on the remove product button in the checkout, I am redirected to my local server on my PC where I developed the site! Is this a browser problem or a HikaShop problem? I use Firefox 3.6.12.  2. When the coupon code is added before selecting shipping or payment method, the coupon value is displayed under Total price, but the default shipping cost disappears. I have to click on Next to see the shipping cost again.  3. When the shipping mode is changed, followed by the coupon code being entered, the behaviour is even more erratic. Sometimes the shipping cost is displayed, other times the coupon value. When Next is clicked in the hope to see the updated price, the order is processed and either the shipping cost or the coupon value is left out.  Please could someone play around on my site and tell me what's going on. I have spent days now to upload about 150 products, but there is no way that I can start marketing my products if this is the kind of behaviour that my customers will have to face.  My site is at")*

Do you use the latest version of HikaShop (1.3.![8)](/media/kunena/emoticons/9.png "8)") ? Otherwise please update as we change a bit the checkout system in 1.3.7 and 1.3.8 and that might explain why you don't have the same behavior as us.

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

15 years 11 months ago -  15 years 11 months ago [\#2633](#2633) by [Chris](/forum/user/377-chris "View Chris's Profile")  Replied by *[Chris](/forum/user/377-chris "View Chris's Profile")* on topic *[Re: Strange behaviour with coupon](/forum/3-bug-report/2601-strange-behaviour-with-coupon#2633 "I want to use the coupon facility on my website, but I find the behaviour totally confusing. I can just imagine how some customers may be confused. These are the problems:  1. This is a serious problem: when I click on the remove product button in the checkout, I am redirected to my local server on my PC where I developed the site! Is this a browser problem or a HikaShop problem? I use Firefox 3.6.12.  2. When the coupon code is added before selecting shipping or payment method, the coupon value is displayed under Total price, but the default shipping cost disappears. I have to click on Next to see the shipping cost again.  3. When the shipping mode is changed, followed by the coupon code being entered, the behaviour is even more erratic. Sometimes the shipping cost is displayed, other times the coupon value. When Next is clicked in the hope to see the updated price, the order is processed and either the shipping cost or the coupon value is left out.  Please could someone play around on my site and tell me what's going on. I have spent days now to upload about 150 products, but there is no way that I can start marketing my products if this is the kind of behaviour that my customers will have to face.  My site is at")*

Yes, I have the latest version 1.3.8.

I removed the coupon from the workflow and changed the steps. The checkout seems to be working now, but it's a pity that I cannot use the coupon without trouble.

Last edit: 15 years 11 months ago by [Chris](/forum/user/377-chris "View Chris's Profile"). Reason: added comment

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8yNjAxLXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtY291cG9uP3RtcGw9bWFya2Rvd24=) 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: 86358
- Thank you received: 14293
-
-

15 years 11 months ago [\#2635](#2635) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Strange behaviour with coupon](/forum/3-bug-report/2601-strange-behaviour-with-coupon#2635 "I want to use the coupon facility on my website, but I find the behaviour totally confusing. I can just imagine how some customers may be confused. These are the problems:  1. This is a serious problem: when I click on the remove product button in the checkout, I am redirected to my local server on my PC where I developed the site! Is this a browser problem or a HikaShop problem? I use Firefox 3.6.12.  2. When the coupon code is added before selecting shipping or payment method, the coupon value is displayed under Total price, but the default shipping cost disappears. I have to click on Next to see the shipping cost again.  3. When the shipping mode is changed, followed by the coupon code being entered, the behaviour is even more erratic. Sometimes the shipping cost is displayed, other times the coupon value. When Next is clicked in the hope to see the updated price, the order is processed and either the shipping cost or the coupon value is left out.  Please could someone play around on my site and tell me what's going on. I have spent days now to upload about 150 products, but there is no way that I can start marketing my products if this is the kind of behaviour that my customers will have to face.  My site is at")*

The behavior that you're describing resembles to when the coupon is not valid. The coupon code is rejected and the coupon field left without the coupon added to the cart.
But then you should get an error message at the top of the screen when that happens explaining you what is the problem.
What kind of coupon did you create ? Did you had date restrictions on it ? If yet, could you try without them?

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

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