add to cart link with coupon code

  • Posts: 843
  • Thank you received: 66
1 year 3 months ago #273981

Hi,

Forgive me if I misunderstood. So there is no possibility to add coupon via url as for now? Only products?

Adding product via url works fine. We send abandoned cart email via acymailing which we modify for every user based on abandoned cart in hikashop. As we have 2-5 abandoned carts per day it's takes 5-10 minutes to send such emails to user. Not a big deal until its summer...
What we found that 30% will return and create order...So its worth it.
However some shops could have more abandoned carts and having real abandoned cart + not paid order reminder ( with having products, coupons and such links inside email ) is a feature must have. It could increase sales drastically.

I remember acymailing was talking about such feature when asked but as for now there is nothing new from them.

So if you could add this to your TODO list and implement it in near future and not after years it would be really great!

Thank you for understanding.

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

  • Posts: 63530
  • Thank you received: 9152
  • MODERATOR
1 year 3 months ago #273982

Hi,

It's actually planned for next version of HikaShop, which is to be released soon.
The implementation was actually simpler than what we expected.
In fact, you can already add it to HikaShop 3.1.1 by adding the code:

if($status || is_null($status)){
			$coupon = JRequest::getString('coupon');
			if(!empty($coupon))
				$cartClass->addCoupon($cart_id, $coupon);
		}
before the code:
$cart = $cartClass->getFullCart($cart_id);
		if(in_array($tmpl, array('ajax', 'raw'))) {
			$ret = $this->getAjaxCartData($used_data, $cart, $status);
			echo json_encode($ret);
			exit;
		}
in the file components/com_hikashop/controllers/product.php

And then you can just add a parameter &coupon=XXX to the add to cart URL you're using and it will do the job.

The following user(s) said Thank You: kyratn

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
1 year 1 month ago #276934

Hi,

i´ve tried your method but it does not work for me. I´ve added the code

if($status || is_null($status)){
			$coupon = JRequest::getString('coupon');
			if(!empty($coupon))
				$cartClass->addCoupon($cart_id, $coupon);
		}
before
		
		$cart = $cartClass->getFullCart($cart_id);
		if($tmpl == 'ajax') {
			$ret = $this->getAjaxCartData($used_data, $cart, $status);
			echo json_encode($ret);
			exit;
		}

in components/com_hikashop/controllers/product.php

and use the following Product url:

mydomain.de/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=2&coupon=58745

I´ve also tried to use the cupon ID but nothing of them works, the product is in the cart but without the code....

I´ve using Hikashop 3.1.1 .

Thanks in advance!

Last Edit: 1 year 1 month ago by Forward Marketing.

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

  • Posts: 63530
  • Thank you received: 9152
  • MODERATOR
1 year 1 month ago #276938

Hi,

I've tried on my end with the 3.2.0 (all the patches applied including this end which will be in the next release) and it's working fine.
The only reason it wouldn't work is if the coupon is not authorized to be added.
So try with a coupon code that doesn't have any restriction.

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
1 year 1 month ago #276973

Hello Nicolas,

the coupon code has no restrictions but it still does not work.

should i use the coupon id or the coupon code in the url?

I´ve tried both, unfortunately without any effect.

regards

Chris

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

  • Posts: 63530
  • Thank you received: 9152
  • MODERATOR
1 year 1 month ago #276988

Hi,

It's the coupon code you need to use.

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
1 year 1 month ago #276998

hi nicolas,

it does not work for me as i said above.

What´s your timeline for the release of V 3.2.0 ?

Last Edit: 1 year 1 month ago by Forward Marketing.

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

  • Posts: 63530
  • Thank you received: 9152
  • MODERATOR
1 year 1 month ago #277005

Hi,

During this week. I Just need some time to finish preparing the release...

The following user(s) said Thank You: Forward Marketing

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
1 year 1 month ago #277578

I´ve installed the new version 3.2 and tried it as i wrote above but it still does not work

It´s working fine now, maybe it was a cache problem...

Last Edit: 1 year 1 month ago by Forward Marketing.

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

  • Posts: 22856
  • Thank you received: 3548
  • MODERATOR
1 year 1 month ago #277579

Hello,

I'm glad it's working for you now.
Please understand that without any details about what you're doing we can't understand what is wrong and we can't for sure reproduce your issue since it's working fine for us.
So it would be better if you provide more information about your coupon, the URL, what is "not working", etc when you contact us next time for another issue.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last Edit: 1 year 1 month ago by nicolas.

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

  • Posts: 140
  • Thank you received: 0
  • Hikashop Business
11 months 1 day ago #282437

I'm on 3.2.1 now. Do I still have to add code to make this work?
Obviously the problem with hacking the code is that it fails after every update.

Thanks.

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

  • Posts: 63530
  • Thank you received: 9152
  • MODERATOR
11 months 1 day ago #282438

Hi,

No. That is now supported by default.

The following user(s) said Thank You: zipadyduda

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

  • Posts: 140
  • Thank you received: 0
  • Hikashop Business
10 months 4 weeks ago #282649

That's awesome thanks.

Now if only we could add more than one type of item to the cart with one link.

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

  • Posts: 63530
  • Thank you received: 9152
  • MODERATOR
10 months 4 weeks ago #282657

Hi,

That's possible too. Since HikaShop 3, you can now add several products at once with a URL link and you can even add the coupon on top of that.
For example, if you set the "Add to cart on listings" option of the HikaShop configuration to "global on listing", it will add all the products for which you set a quantity on the listings when you click on the main add to cart button at the button. So you just need to use the same parameter names than this button uses to add several products at once.

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

  • Posts: 843
  • Thank you received: 66
10 months 4 weeks ago #282692

Hi,

Any chance Hikashop could consider to develop abandoned and order not paid reminder emails for real? Which could be added to existing Emails feature?

It is strange that Hikashop is about 7 years old and there is not such emails by default. All proper shopping carts have it without need extra component or development....

I can say that we do send such emails manually and our profit per month has increased about 15%. Some people had issues with payment some had issues during checkout. So to all who is using Hikashop I suggest to try to send such emails...This will definetely return some customers and increase your profit!

Kind Regards

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

  • Posts: 140
  • Thank you received: 0
  • Hikashop Business
10 months 4 weeks ago #282708

What is the syntax of that? I tried and it's not working, it only adds one item to cart.

example

www.mydomain.com/index.php?option=com_hi...kout=1&product_id=24

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

  • Posts: 140
  • Thank you received: 0
  • Hikashop Business
10 months 4 weeks ago #282709

I agree, even with acymailing abandoned cart situation is not ideal. However this is probably a topic for a new thread.

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

  • Posts: 843
  • Thank you received: 66
10 months 4 weeks ago #282710

Hi,

It should look like this:

http://mysite.com/index.php?option=com_hikashop&ctrl=product&task=updatecart&data[XXX]=1&data[XXX]=1&add=1


Where XXX is your product id


Thanks

Last Edit: 10 months 4 weeks ago by kyratn.
The following user(s) said Thank You: zipadyduda

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

  • Posts: 22856
  • Thank you received: 3548
  • MODERATOR
10 months 3 weeks ago #282719

Hi,

However this is probably a topic for a new thread.

Yes, it is.
In that thread ; it's unfortunately far from the subject.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.139 seconds
Powered by Kunena Forum