Hi, I have a problem with a php code. I have to make the paiment on delivery as free as the total of the products (excluding shipping costs) exceeds a certain amount, now on my extension for the payment on delivery I have this code:
if ($total> 291.50)
{
Cost = $ 0;
}
else
{
Cost = $ 3;
}
But this code calculates the final total of the cart, total without taxes + taxes + shipping costs.
I need to calculate the total Without taxes + taxes
What should I insert in place of "$total"?
My version of Opencart is 2.3.0.2
Thanks in advance for your reply!
if ($total> 291.50)
{
Cost = $ 0;
}
else
{
Cost = $ 3;
}
But this code calculates the final total of the cart, total without taxes + taxes + shipping costs.
I need to calculate the total Without taxes + taxes
What should I insert in place of "$total"?
My version of Opencart is 2.3.0.2
Thanks in advance for your reply!
Where are you trying to make this change? It's not clear what exactly you are trying to do?
If you are modifying a custom extension there is not much anyone can suggest as they will not know how the custom extension works. You could try asking a developer of the author of the extension to make the changes for you.
Hi ADD Creative, perhaps an image is better than a thousand words. I enclose screenshots of the checkuot and extension page.
However I try to contact the developer.
However I try to contact the developer.
Attachments
Screenshot checkout page - Chackout page.jpg (175.7 KiB) Viewed 6526 times
screenshot extension - Cash on delivery.jpg (156.4 KiB) Viewed 6526 times
have you tried insert prices without currency symbol? From another hand very strange extension if user should write some php code for that simple usage...
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
I would not know how to insert prices without a currency symbol! However they weigh that it should be simple, it would be enough to change $ total with another word, but I do not know which one. Anyway I wrote to the developer of the extension!
What does "Just PM me" mean?
What does "Just PM me" mean?
Try looking or asking in the forum post for that extension. viewtopic.php?f=119&t=104532
At a guess it will be something like.
At a guess it will be something like.
Code: Select all
if ($this->getSubTotalWithTax() > 291.50)
{
$cost = 0;
}
else
{
$cost = 3;
}
Who is online
Users browsing this forum: No registered users and 17 guests