Coupon

  • Posts: 34
  • Thank you received: 0
12 years 11 months ago #32481

Joomla 1.7 and Hikashop 1.5.3 Business. When one adds a coupon to use at checkout, there's a little "X" circle beside it that will allow you to remove it. When it's clicked, nothing happens (this appears to be the case in almost any browser)...it has to be clicked at least 2 or 3 times quickly for it to work. Is there a fix for this so that it removes the coupon when clicked just once?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32516

I just tried on our demo website and it works the first time I click on the X.
Do you have some caching enabled on your website (in the joomla configuration or via the system cache plugin)?
Could you give a link to your website so that we can see that ?

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

  • Posts: 34
  • Thank you received: 0
12 years 11 months ago #32538

There is no caching enabled.

Last edit: 12 years 10 months ago by SD.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32565

I forgot to ask but we'll of course need a coupon code to look at that :)

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

  • Posts: 34
  • Thank you received: 0
12 years 11 months ago #32605

Keep in mind this is a live site.

Last edit: 12 years 10 months ago by SD.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32637

Could you change the line:

<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>

by:
global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
?>
<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'.$url_itemid); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>


in the file "coupon" of the view "checkout" vi the menu Display->Views and try again ?

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

  • Posts: 34
  • Thank you received: 0
12 years 11 months ago #32673

Could you change the line:

<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>

by:
global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
?>
<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'.$url_itemid); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>


in the file "coupon" of the view "checkout" vi the menu Display->Views and try again ?



To confirm,

replace:

<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>

with



global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
?>
<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'.$url_itemid); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32698

I forgot a ?> in the first piece of code. It should be:

?>
<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>


to be replaced by:

global $Itemid;
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
?>
<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).'&previous='.$this->step.'&removecoupon=1'.'&'.JUtility::getToken().'=1'.$url_itemid); ?>" ><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" alt="remove coupon" /></a>

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

  • Posts: 62
  • Thank you received: 0
12 years 11 months ago #32794

I have recently changed my checkout work flow to login_address_shipping_coupon,payment_terms_confirm_cart_status_fields,end.

Since doing so adding a coupon has been real buggy. It often takes numerous goes to get it to actually add the coupon. Generally it just refreshes the same step in the checkout and looks like it has done nothing. When it finally does actually add the coupon it then automatically submits to the next step where I have payment. If you then go back in the checkout process there is no option to remove the coupon although it is still added to the order.

If I change the work flow to this login_address_shipping,payment_terms_coupon_confirm_cart_status_fields,end there is no issue with the coupon behaviour. You can add and remove coupons without a problem. The reason I cannot have this work flow is that the adding of a coupon deselects the shipping method and my payment methods heavily depend on the shipping method.

Can you please assist with this?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32809

Since the shipping methods restrictions can be based on the total of the order, the shipping methods selection has to be reseted indeed.
If you want, you could have the coupon view on both steps:
login_address_shipping_coupon,payment_terms_confirm_cart_coupon_status_fields,end

For the fact that the coupon is not working properly, that's because we didn't thought about having that view on a step without the cart view. The fix is easy, just add the line:
$this->assignRef('coupon',@$cart->coupon);
after the line:
$coupon_error_message = JRequest::getVar('coupon_error_message','');
in the file components/com_hikashop/views/checkout/view.html.php

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

  • Posts: 62
  • Thank you received: 0
12 years 11 months ago #32873

Thank you yes this has worked.

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

  • Posts: 34
  • Thank you received: 0
12 years 10 months ago #35378

Thanks, this solution has worked well.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum