Strange behaviour with coupon

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #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 www.thulutess.com

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2602

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&3. Could you try to add the code

if(empty($shipping_id) && count($usable_rates)){
				$rate = reset($usable_rates);
				$app->setUserState( HIKASHOP_COMPONENT.'.shipping_data',$rate);
				$app->setUserState( HIKASHOP_COMPONENT.'.shipping_id',$rate->shipping_id );
				$app->setUserState( HIKASHOP_COMPONENT.'.shipping_method',$rate->shipping_type );
				$order->shipping = $rate;
				$shipping =& $order->shipping;
				$shippings = array(&$shipping);
				$currencyClass->processShippings($shippings);
				//calculate total price with shipping
				$currencyClass->addShipping($order->shipping,$order->full_total);
				$order->full_total=&$order->shipping->total;
			}
after the code
$currencyClass->processShippings($usable_rates);
			$shipping_method=$app->getUserState( HIKASHOP_COMPONENT.'.shipping_method' );
			$shipping_id=$app->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 or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2608

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 or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2630

Do you use the latest version of HikaShop (1.3.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 or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2633

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: 13 years 11 months ago by Chris. Reason: added comment

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2635

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 or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum