I'm surprised this is not standard in Opencart to be honest. People expect to apply a coupon discount when looking at the totals and committing to purchase as on the checkout. Anyhow, any kind person here able to write this to work with the latest opencarts? Thanks.
Webmaster for: http://www.getlaidbeds.co.uk + www.mattressmoose.co.uk + www.pixellounge.co.uk
I'm using OC 1.5.1.3
When using Paypal Standard which gives a total without discount :
100€ - 20% = 80€ in OC, you have to pay 100€ on the Paypal standard page,
When using Paypal Hosted :
100€ - 20% in OC, you have to pay 80€ on the Paypal Hosted page (!!)
Maybe someone that knows how to read code might be inspired to see Paypal Hosted one and adapt it for Paypal Standard,
Best regards.
When using Paypal Standard which gives a total without discount :
100€ - 20% = 80€ in OC, you have to pay 100€ on the Paypal standard page,
When using Paypal Hosted :
100€ - 20% in OC, you have to pay 80€ on the Paypal Hosted page (!!)
Maybe someone that knows how to read code might be inspired to see Paypal Hosted one and adapt it for Paypal Standard,
Best regards.
Hi,
I am using open cart 1.5.4 and shoppica2 theme. I try everything I can but, it did not work. I change the word english with my language and the word default with my theme name. Also I reinstall vqmod and cleared the cache.
Thank you.
I am using open cart 1.5.4 and shoppica2 theme. I try everything I can but, it did not work. I change the word english with my language and the word default with my theme name. Also I reinstall vqmod and cleared the cache.
Thank you.
Hi;
@ gpsyroxy :
Try this modification or extension, it is for free.
http://www.opencart.com/index.php?route ... on_id=9519
It support Shoppica2.
Sam
@ gpsyroxy :
Try this modification or extension, it is for free.
http://www.opencart.com/index.php?route ... on_id=9519
It support Shoppica2.
Sam
I have a small problem with this mod, when I put in the coupon code on the checkout page it will not process the coupon code. Is there a fix for this? I attached a screenshot of the process
Attachments
4-30-2013 2-42-15 PM.png (171.77 KiB) Viewed 15597 times
Kevin Griffith
Developer
Hello,
I added the .xml file through VQMod and it said the upload was successful but I get the error "
---------- Date: 2013-06-13 17:42:12 ~ IP : 122.148.224.250 ----------
REQUEST URI : /admin/index.php?route=module/vqmod_manager&token=5dcccd29eef944a2613b6526f0483c37
MOD DETAILS:
modFile : /smhhome/a-web/a1/1d/flowbenchoz.com/public/vividlaser/vqmod/xml/checkout-coupon.xml
id : Opencart core file modifications for adding coupon support into the checkout sequence
version : 1.5.1.1
vqmver : 1.2.3
author : mhccorp.com
Could not resolve path for [catalog/controller/checkout/payment.php] (SKIPPED)
Could not resolve path for [catalog/view/theme/default/template/checkout/payment.tpl] (SKIPPED)
I checked my files and there is no [payment.php] or payment.tpl].
I have OC 1.5.5.1 could you help please?
I added the .xml file through VQMod and it said the upload was successful but I get the error "
---------- Date: 2013-06-13 17:42:12 ~ IP : 122.148.224.250 ----------
REQUEST URI : /admin/index.php?route=module/vqmod_manager&token=5dcccd29eef944a2613b6526f0483c37
MOD DETAILS:
modFile : /smhhome/a-web/a1/1d/flowbenchoz.com/public/vividlaser/vqmod/xml/checkout-coupon.xml
id : Opencart core file modifications for adding coupon support into the checkout sequence
version : 1.5.1.1
vqmver : 1.2.3
author : mhccorp.com
Could not resolve path for [catalog/controller/checkout/payment.php] (SKIPPED)
Could not resolve path for [catalog/view/theme/default/template/checkout/payment.tpl] (SKIPPED)
I checked my files and there is no [payment.php] or payment.tpl].
I have OC 1.5.5.1 could you help please?
I've just installed this mod on v1.5.4 and it worked perfectly first time, it appears. Thanks very much indeed.
I want to add that I think it's best if the first post in this thread is updated with all the version downloads. I had to read through everything, and to a string search for the OP's name to find all the various versions he's made available throughout the discussion, only to discover that the one I needed to download was in fact the last one published.
So I can confirm that the last one published at the time of writing works perfectly for a custom theme derived from the default theme on v1.5.4. I copied the XML file into the vqmod folder and it worked like a charm straight away.
I want to add that I think it's best if the first post in this thread is updated with all the version downloads. I had to read through everything, and to a string search for the OP's name to find all the various versions he's made available throughout the discussion, only to discover that the one I needed to download was in fact the last one published.
So I can confirm that the last one published at the time of writing works perfectly for a custom theme derived from the default theme on v1.5.4. I copied the XML file into the vqmod folder and it worked like a charm straight away.
Hi,samdz wrote:Hi;
@ gpsyroxy :
Try this modification or extension, it is for free.
http://www.opencart.com/index.php?route ... on_id=9519
It support Shoppica2.
Sam
It works for me but it doesn't apply the theme (the button image doesn't appear) Also i've 1.5.4.1 and shoppica 2 and this extension (http://www.opencart.com/index.php?route ... on_id=9519) installed
Can somebody help me? Thanks!
I am trying to use this to get the coupon to show up during checkout, however I can't get it to work with my Dutch version of the website. How do I modify the file so that it can be used with both English and Dutch?
This is the Dutch part that should be used:
But then I don't know how to implement it in the file to get it to work properly. Any help? Please note that I am a coding n00b (as in, I know nothing about it).
This is the Dutch part that should be used:
Code: Select all
<file name="catalog/language/dutch/checkout/checkout.php">
<operation>
<search position="after"><![CDATA[$_['text_comments']]]></search>
<add><![CDATA[
<?php if ($discount_amount_cart) { ?>
<input type="hidden" name="discount_amount_cart" value="<?php echo $discount_amount_cart; ?>" />
<?php } ?>
$_['entry_payment_coupon'] = 'Voer uw code in (indien beschikbaar) en klik op "Gebruik Kortingsbon"';
$_['text_payment_coupon'] = 'Kortingsbon Code:';
$_['text_payment_coupon_success'] = 'Uw kortingsbon is met succes toegevoegd aan uw bestelling. U zult deze in de volgende stap zien.';
$_['button_coupon'] = 'Gebruik Kortingsbon';
]]></add>
</operation>
</file>
But then I don't know how to implement it in the file to get it to work properly. Any help? Please note that I am a coding n00b (as in, I know nothing about it).

Hi,
to have it in english too you must to duplicate those code but translated in english, like the original version:
to have it in english too you must to duplicate those code but translated in english, like the original version:
Code: Select all
<file name="catalog/language/english/checkout/checkout.php">
<operation>
<search position="after"><![CDATA[$_['text_comments']]]></search>
<add><![CDATA[
<?php if ($discount_amount_cart) { ?>
<input type="hidden" name="discount_amount_cart" value="<?php echo $discount_amount_cart; ?>" />
<?php } ?>
$_['entry_payment_coupon'] = 'English translation';
$_['text_payment_coupon'] = 'English translation:';
$_['text_payment_coupon_success'] = 'English translation';
$_['button_coupon'] = 'English translation';
]]></add>
</operation>
</file>
Thanks for your reply!
I had altered the file to have both the English and Dutch in there, but the way I did it did not seem to work, it just gives me an error during checkout. So I am probably missing something/doing something wrong. Here is the code with both English and Dutch in it:
I had altered the file to have both the English and Dutch in there, but the way I did it did not seem to work, it just gives me an error during checkout. So I am probably missing something/doing something wrong. Here is the code with both English and Dutch in it:
Code: Select all
<modification>
<id>Opencart core file modifications for adding coupon support into the checkout sequence</id>
<version>1.5.1.1</version>
<vqmver>1.2.3</vqmver>
<author>mhccorp.com</author>
<file name="catalog/controller/checkout/payment.php">
<operation>
<search position="after"><![CDATA[$this->data['text_comments'] = $this->language->get('text_comments');]]></search>
<add><![CDATA[
$this->data['entry_payment_coupon'] = $this->language->get('entry_payment_coupon');
$this->data['text_payment_coupon'] = $this->language->get('text_payment_coupon');
$this->data['text_payment_coupon_success'] = $this->language->get('text_payment_coupon_success');
$this->data['button_coupon'] = $this->language->get('button_coupon');
]]></add>
</operation>
</file>
<file name="catalog/language/english/checkout/checkout.php">
<operation>
<search position="after"><![CDATA[$_['text_comments']]]></search>
<add><![CDATA[
<?php if ($discount_amount_cart) { ?>
<input type="hidden" name="discount_amount_cart" value="<?php echo $discount_amount_cart; ?>" />
<?php } ?>
$_['entry_payment_coupon'] = 'Enter your code (if available) and click "Apply Coupon"';
$_['text_payment_coupon'] = 'Discount Coupon Code:';
$_['text_payment_coupon_success'] = 'Your discount coupon has been successfuly applied to your order. You will see it in the next checkout step';
$_['button_coupon'] = 'Apply Coupon';
]]></add>
</operation>
</file>
<file name="catalog/language/dutch/checkout/checkout.php">
<operation>
<search position="after"><![CDATA[$_['text_comments']]]></search>
<add><![CDATA[
<?php if ($discount_amount_cart) { ?>
<input type="hidden" name="discount_amount_cart" value="<?php echo $discount_amount_cart; ?>" />
<?php } ?>
$_['entry_payment_coupon'] = 'Voer uw code in (indien beschikbaar) en klik op "Gebruik Kortingsbon"';
$_['text_payment_coupon'] = 'Kortingsbon Code:';
$_['text_payment_coupon_success'] = 'Uw kortingsbon is met succes toegevoegd aan uw bestelling. U zult deze in de volgende stap zien.';
$_['button_coupon'] = 'Gebruik Kortingsbon';
]]></add>
</operation>
</file>
<file name="catalog/view/theme/default/template/checkout/payment.tpl">
<operation>
<search position="after" offset="2"><![CDATA[<textarea name="comment"]]></search>
<add><![CDATA[
<div id="coupon">
<b><?php echo $entry_payment_coupon; ?></b><br /><br />
<?php echo $text_payment_coupon; ?>
<input type="text" name="coupon" value="" />
<a id="button-coupon" class="button"><span><?php echo $button_coupon; ?></span></a><br />
</div>
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[<script type="text/javascript"><!--]]></search>
<add><![CDATA[
<script type="text/javascript"><!--
$('#button-coupon').bind('click', function() {
$.ajax({
type: 'POST',
url: 'index.php?route=total/coupon/calculate',
data: $('#coupon :input'),
dataType: 'json',
beforeSend: function() {
$('#button-coupon').attr('disabled', true);
$('#button-coupon').after('<span class="wait"> <img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
},
complete: function() {
$('#button-coupon').attr('disabled', false);
$('.wait').remove();
},
success: function(json) {
if (json['error']) {
alert( json['error'] );
} else {
$("input[name=coupon]").val("");
alert( "<?php echo $text_payment_coupon_success; ?>" );
}
}
});
});
//--></script>
]]></add>
</operation>
</file>
</modification>
Just downloaded the updated mod and it works great in Opencart 1.5.3.1.
Thanks Qphoria for the update.
Thanks Qphoria for the update.
Using OpenCart 2.1.0.1 and getting the following error when refreshing the modifications screen after uploading the xml file.
On a side note- I don't understand why this isn't just standard to have coupons on the checkout page. We get 2-5 customers EVERYDAY calling or emailing us because they can't find where to put in a coupon code.
Notice: Trying to get property of non-object in /xxxx/yyyy/zzzz/admin/controller/extension/modification.php on line 142Warning: Cannot modify header information - headers already sent by (output started at /xxxx/yyyy/zzzz/admin/index.php:84) in /xxxx/yyyy/zzzz/system/library/response.php on line 12
On a side note- I don't understand why this isn't just standard to have coupons on the checkout page. We get 2-5 customers EVERYDAY calling or emailing us because they can't find where to put in a coupon code.
This is unrelated.. are you trying to load a vqmod as ocmod? because that won't work unless you are running a customized ocmod that supports vqmodbruiseviolet wrote:Using OpenCart 2.1.0.1 and getting the following error when refreshing the modifications screen after uploading the xml file.
Notice: Trying to get property of non-object in /xxxx/yyyy/zzzz/admin/controller/extension/modification.php on line 142Warning: Cannot modify header information - headers already sent by (output started at /xxxx/yyyy/zzzz/admin/index.php:84) in /xxxx/yyyy/zzzz/system/library/response.php on line 12
http://www.opencart.com/index.php?route ... n_id=19501
Who is online
Users browsing this forum: Majestic-12 [Bot] and 6 guests