Post by AliceH » Mon Apr 13, 2020 8:27 am

I have a free download which changes each day, this is set in the specials, the problem is that when I set the price to 0.000 for that day in specials it does not show the special price it shows the original price which is $1.50 . If I set the special price to 0.001 then it will show the original price and the special price as 0.000, which is ideal except that it will not trigger the free checkout when the price is 0.001. I need the product that is free to appear in the special module so that people can find it. but If it has the original price they all have a meltdown and don't bother checking out even though it will checkout for free. So to fix this I have to add it as both a discount and a special. Sometimes I might miss adding the discount or the date is out or for some reason the price shows as $1.50, they all get acopic and can't deal with it, they don't try checking out to see what will happen. I have tried to communicate to my customers that they should try going through the checkout any way but I can't seem to get the message across.
is there a way to make the free checkout trigger for a price that is not exactly zero? that way I could put it in as 0.001 and not have to put the discount price and date in as well.
I thought about using COD for the freebies but that will only let me set a lower limit for price and not an upper limit so I would not be able to prevent people from using it for actual paid downloads.

https://www.embroidery-allsorts.com/


User avatar
Active Member

Posts

Joined
Sun Jan 09, 2011 11:00 am
Location - Australia

Post by letxobnav » Mon Apr 13, 2020 11:11 am

always a bad idea to try to tweak features to do things they were not designed for, it will give you all kinds of unintended consequences which you then try to tweak, and so on and so on.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by AliceH » Mon Apr 13, 2020 8:23 pm

Thank you for sharing your opinion, hopefully someone will come along and offer some assistance.

https://www.embroidery-allsorts.com/


User avatar
Active Member

Posts

Joined
Sun Jan 09, 2011 11:00 am
Location - Australia

Post by straightlight » Mon Apr 13, 2020 8:59 pm

An extension would be required to do so either from the cart library, or by using an extension payment or total module. I would suggest to look on the Marketplace for such request. If none of the extensions suits your needs, you could always create a new service request in the Commercial Support section of the forum to get this done as a custom job.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by Johnathan » Mon Apr 13, 2020 10:17 pm

Try this edit:

Code: Select all

IN:
/catalog/model/extension/payment/free_checkout.php

REPLACE:
if ($total <= 0.00) {

WITH:
if ($total <= 0.001) {

You could probably use anything up to 0.009 as well, if using 0.001 doesn't seem to work. Hope that helps.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by straightlight » Mon Apr 13, 2020 10:18 pm

Johnathan wrote:
Mon Apr 13, 2020 10:17 pm
Try this edit:

Code: Select all

IN:
/catalog/model/extension/payment/free_checkout.php

REPLACE:
if ($total <= 0.00) {

WITH:
if ($total <= 0.001) {

You could probably use anything up to 0.009 as well, if using 0.001 doesn't seem to work. Hope that helps.
That may only resolved the free checkout validations but not for the COD payment method ...

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by letxobnav » Mon Apr 13, 2020 10:22 pm

if you must.

you can change all occurrences of

Code: Select all

if ((float)$xxxxxxx['special']) {
and

Code: Select all

if ($xxxxxx['special']) {
and

Code: Select all

if ($xxxxxx['special'] > 0) {
to

Code: Select all

if (!is_null($xxxxxxx['special'])) {
or

Code: Select all

if (is_numeric($xxxxxxxx['special'])) {
where xxxxxx are the different array variable names used
that should allow you to set specials with a price of 0.00 and work with it.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by straightlight » Mon Apr 13, 2020 11:37 pm

Only manipulating the arrays in PHP may not describe specifically how to manipulate the outputs from the TWIG files where also extensions might be involved.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by AliceH » Tue Apr 14, 2020 4:22 pm

Johnathan wrote:
Mon Apr 13, 2020 10:17 pm
Try this edit:

Code: Select all

IN:
/catalog/model/extension/payment/free_checkout.php

REPLACE:
if ($total <= 0.00) {

WITH:
if ($total <= 0.001) {

You could probably use anything up to 0.009 as well, if using 0.001 doesn't seem to work. Hope that helps.
Thank you Johnathan That worked perfectly.

https://www.embroidery-allsorts.com/


User avatar
Active Member

Posts

Joined
Sun Jan 09, 2011 11:00 am
Location - Australia

Post by Johnathan » Tue Apr 14, 2020 10:34 pm

👍 👍

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 31 guests