Post by andy3dfx » Fri Mar 18, 2011 8:57 pm

Is it possible to integrate coupon/discount code via url?

When customer click on link. like
http://www.opencart.com/index.php?coupon=XXXXX
and the coupon code is automatically applied at check out?

Is there a module for this?

Which file I have to modified for this to work. I really don't want to hard code this into core file

I know this easier using

Code: Select all

 
$_SESSION['coupon'] = $_GET['coupon'];
and then apply the session coupon in check out page. This isn't good for future opencart upgrade.
A module would take much more time at this moment, but I need to get this new shop up.

Thank You

Newbie

Posts

Joined
Fri Mar 18, 2011 8:33 pm

Post by OpenM » Fri Sep 16, 2011 9:54 pm

Any?

Newbie

Posts

Joined
Sun Aug 14, 2011 2:34 am

Post by scanreg » Fri Sep 16, 2011 10:01 pm

Interesting idea :)

Newbie

Posts

Joined
Thu May 06, 2010 12:15 am

Post by LoveCastle » Wed Nov 09, 2011 5:26 am

bumppppp
good idea

Newbie

Posts

Joined
Wed Nov 09, 2011 3:36 am

Post by Qphoria » Wed Nov 09, 2011 5:31 am

yea this is and should be a required feature of opencart. This is how a lot of the "retailmenot.com" codes work. You click the link and it contains the coupon code and their affiliate code to insure the right people get paid

Here's how to do it (1.5.1.x):

1. EDIT:
index.php

2. FIND:
// Currency

3. BEFORE, ADD:

Code: Select all

// Coupon
if (!empty($request->get['coupon'])) {
	$session->data['coupon'] = $request->get['coupon'];
}
Here's how to do it (2.2.x):

1. EDIT:
framework.php

2. FIND:
// Dispatch

3. BEFORE, ADD:

Code: Select all

// Coupon in url
if (!empty($_GET['coupon'])) {
   $session->data['coupon'] = $_GET['coupon'];
}
That's it!

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by LoveCastle » Wed Nov 09, 2011 6:14 am

:D thankkkkkkkkkk!! it work perfect

Newbie

Posts

Joined
Wed Nov 09, 2011 3:36 am

Post by scanreg » Wed Nov 09, 2011 8:49 pm

Qphoria wrote:Added to svn
Great Feature :)

Newbie

Posts

Joined
Thu May 06, 2010 12:15 am

Post by LoveCastle » Wed Nov 09, 2011 9:16 pm

can it also be added to cookies like affiliate tracking code :D
or make user remember this coupon code, and it will be automatically filled when check out? pls help!

Newbie

Posts

Joined
Wed Nov 09, 2011 3:36 am

Post by thallescard » Fri Dec 30, 2011 11:10 pm

Yes, my extension will not change any file, just install and manage...
It's possible too add banners when coupon is loaded, so you can show what costumer will win with the coupon:

Image

Thalles Cardoso http://thallescard.com.br
Modules:
Product Page Shipping Estimator
Notify When Product Arrives (Support Product Options)
Opencart Wordpress ADS
URL Coupon Link
Team Msn Messenger Chat (free)


User avatar
Newbie

Posts

Joined
Fri Apr 29, 2011 8:09 pm

Post by straightlight » Fri Dec 30, 2011 11:11 pm

Looks great. Although, how would we know if this banner is a specific one meant for a customer straight or a simple publicity ? In addition, will this banner also be deactivated if the site were to be put under maintenance ? ;)

Tired of paying for service fees to export your database from other databases over Opencart?

Try those extensions for FREE: http://www.opencart.com/index.php?route ... aightlight

Regards,
Straightlight


Newbie

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thallescard » Fri Dec 30, 2011 11:23 pm

You can add a different banner for each coupon you have.
The module allows you to select an image as banner, so you can add any banner to any coupon, or if you prefer, you can write text instead of create a banner.

And as module will be deactived if the site is under maintenance, the banner will not show.

See:
Image

Thalles Cardoso http://thallescard.com.br
Modules:
Product Page Shipping Estimator
Notify When Product Arrives (Support Product Options)
Opencart Wordpress ADS
URL Coupon Link
Team Msn Messenger Chat (free)


User avatar
Newbie

Posts

Joined
Fri Apr 29, 2011 8:09 pm

Post by straightlight » Fri Dec 30, 2011 11:52 pm

Looks great. I do hope the best of luck with that contribution. However, you have a typo on your title (coupom). ;)

Tired of paying for service fees to export your database from other databases over Opencart?

Try those extensions for FREE: http://www.opencart.com/index.php?route ... aightlight

Regards,
Straightlight


Newbie

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thallescard » Sat Dec 31, 2011 12:25 am

Thanks straightlight, and i will correctly the text, it's because i'm brazilian and sometimes i confuse things :)

In brazil coupon = cupom. :D

Thalles Cardoso http://thallescard.com.br
Modules:
Product Page Shipping Estimator
Notify When Product Arrives (Support Product Options)
Opencart Wordpress ADS
URL Coupon Link
Team Msn Messenger Chat (free)


User avatar
Newbie

Posts

Joined
Fri Apr 29, 2011 8:09 pm

Post by straightlight » Sat Dec 31, 2011 12:28 am

It's alright. Does your contribution also supports universal languages ? :)

Tired of paying for service fees to export your database from other databases over Opencart?

Try those extensions for FREE: http://www.opencart.com/index.php?route ... aightlight

Regards,
Straightlight


Newbie

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thallescard » Sat Dec 31, 2011 2:25 am

Hum...

It suports multilanguage for module texts, but no for coupon display message. Its look a good idea have multilanguage messages, i will change this asap.

Thalles Cardoso http://thallescard.com.br
Modules:
Product Page Shipping Estimator
Notify When Product Arrives (Support Product Options)
Opencart Wordpress ADS
URL Coupon Link
Team Msn Messenger Chat (free)


User avatar
Newbie

Posts

Joined
Fri Apr 29, 2011 8:09 pm

Post by straightlight » Sat Dec 31, 2011 2:30 am

Sounds ideal in the mean time to notify your users from marketplace that your package has been updated starting at that point of time. In the mean time, to create coupons for multi-store would also be beneficial for merchants as well for customers. :)

Tired of paying for service fees to export your database from other databases over Opencart?

Try those extensions for FREE: http://www.opencart.com/index.php?route ... aightlight

Regards,
Straightlight


Newbie

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thehumancpu » Fri Nov 15, 2013 3:21 am

This got removed from the 1.5.6 version FYI. I don't know if it was because there was a module that does it better?

Newbie

Posts

Joined
Mon Oct 19, 2009 10:59 am

Post by Cue4cheap » Fri Nov 15, 2013 6:07 am

Could you clarify what you mean by "this got removed"?? since as far as I know this wasn't included in any version it was an add-on that you use to make that functionality.

Mike

www.cuesplus.com


Newbie

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Qphoria » Fri Nov 15, 2013 11:21 pm

Cue4cheap wrote:Could you clarify what you mean by "this got removed"?? since as far as I know this wasn't included in any version it was an add-on that you use to make that functionality.

Mike
As shown above, I added this to the core at one point. Daniel didn't like it so he removed it in later versions

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Apr 13, 2016 11:25 am

Updated my first post for 2.2.x

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: Google [Bot], Leviron and 77 guests