- Posts: 9
- Thank you received: 0
discount also influences the delivery value?
11 years 1 week ago #214981
by adriel350
discount also influences the delivery value? was created by adriel350
-- HikaShop version -- : 2.5.0
Hi,
First I loved this exelente tool that you guys have provided .
One of the payment methods (Bank transfer) in my website has a discount of 10 % on the value of the product ,
the problem is that it also calculates the discount upon the delivery value , how can I solve this problem ?
Hi,
First I loved this exelente tool that you guys have provided .
One of the payment methods (Bank transfer) in my website has a discount of 10 % on the value of the product ,
the problem is that it also calculates the discount upon the delivery value , how can I solve this problem ?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 6 days ago #214988
by Mohamed Thelji
Replied by Mohamed Thelji on topic discount also influences the delivery value?
Hello,
Thank you.
Can you give us more information on the way you are applying your discount ?One of the payment methods (Bank transfer) in my website has a discount of 10 % on the value of the product ,
Thank you.
The following user(s) said Thank You: adriel350
Please Log in or Create an account to join the conversation.
11 years 6 days ago #215132
by adriel350
Replied by adriel350 on topic discount also influences the delivery value?
Yes , I am sending attached a screenshot.
Use the percentage option to apply the discount should apply to all products from the site , if the customer choose this method of payment.
Use the percentage option to apply the discount should apply to all products from the site , if the customer choose this method of payment.
Please Log in or Create an account to join the conversation.
11 years 5 days ago #215167
by nicolas
Replied by nicolas on topic discount also influences the delivery value?
Hi,
Well, using the payment fee as a discount is already border line, so there is no mechanism to have it apply to only the products and not the shipping fee.
The only solution would be to customize the code:
in the file administrator/components/com_hikashop/classes/payment.php in order to calculate differently the payment fee. But you'll need the help of a developer in order to do that.
Well, using the payment fee as a discount is already border line, so there is no mechanism to have it apply to only the products and not the shipping fee.
The only solution would be to customize the code:
Code:
$methods[$k]->payment_price = $currencyClass->round(($price_all * (float)@$method->payment_params->payment_percentage / 100) + @$method->payment_price,$currencyClass->getRounding($currency,true));
The following user(s) said Thank You: adriel350
Please Log in or Create an account to join the conversation.
11 years 5 days ago #215242
by adriel350
Replied by adriel350 on topic discount also influences the delivery value?
hi , thanks for the reply , I found that the line of code which you reported:
What I'm trying to do only need recall the value of sending and add it on that account , but unfortunately I can not find it , if that's possible someone could send me ?
Code:
$methods[$k]->payment_price = ($price_all* (float)@$method->payment_params->payment_percentage / 100) + @$method->payment_price ;
What I'm trying to do only need recall the value of sending and add it on that account , but unfortunately I can not find it , if that's possible someone could send me ?
Please Log in or Create an account to join the conversation.
11 years 4 days ago #215268
by nicolas
Replied by nicolas on topic discount also influences the delivery value?
Hi,
Do a var_dump() of the variable $order. One of the sub attributes of that object should contain the value you're looking for. If you're a developer, it shouldn't be a problem.
Do a var_dump() of the variable $order. One of the sub attributes of that object should contain the value you're looking for. If you're a developer, it shouldn't be a problem.
The following user(s) said Thank You: adriel350
Please Log in or Create an account to join the conversation.
11 years 3 days ago #215361
by adriel350
Replied by adriel350 on topic discount also influences the delivery value?
hi ,
Unfortunately I am not a developer , I have some knowledge of PHP, but i could do with it was correctly calculated the discount amount , modified the line as follows :
But what to modify the value that will appear in the email and at the end of the purchase, because in these places still show the wrong value , which I file to modify to achieve the desired result in these steps?
Unfortunately I am not a developer , I have some knowledge of PHP, but i could do with it was correctly calculated the discount amount , modified the line as follows :
Code:
$methods[$k]->payment_price = (@$order->full_total->prices[0]->price_value_without_shipping_with_tax* (float)@$method->payment_params->payment_percentage / 100) + @$method->payment_price
But what to modify the value that will appear in the email and at the end of the purchase, because in these places still show the wrong value , which I file to modify to achieve the desired result in these steps?
Please Log in or Create an account to join the conversation.
11 years 3 days ago #215374
by nicolas
Replied by nicolas on topic discount also influences the delivery value?
Hi,
You'll find a similar line to calculate the percentage fee in the same file.
Make sure that you change them all and that should help.
You can search for "payment_params->payment_percentage" in that file in order to find them.
You'll find a similar line to calculate the percentage fee in the same file.
Make sure that you change them all and that should help.
You can search for "payment_params->payment_percentage" in that file in order to find them.
The following user(s) said Thank You: adriel350
Please Log in or Create an account to join the conversation.
11 years 23 hours ago #215568
by adriel350
Replied by adriel350 on topic discount also influences the delivery value?
HI , apparently my version of hikashop was outdated , with the latest(2.6.0) got the desired result , thank Nicolas for the explanation , the file will be attached next to this post if someone wanted.
It would be interesting to have this option without being necessary to modify the source code , perhaps in the future.
Thanks again .
It would be interesting to have this option without being necessary to modify the source code , perhaps in the future.
Thanks again .
Please Log in or Create an account to join the conversation.
Time to create page: 0.369 seconds