- Posts: 13
- Thank you received: 0
Shipping calculation with multiple item discount and credit charge
- themagicbag
-
Topic Author
- Offline
Less
More
5 years 5 months ago #332123
by themagicbag
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.26
-- PHP version -- : 7.4.16
I am using the Manual Shipping plugin and shipping prices per product, which are entered for each product in the store. I would like to include a 10% discount on shipping when customers order more than one product. I would also like to add in a 3% charge (based on the total product cost in the order) to cover credit card transaction fees.
For example, I have a hat that costs $10.00 and the shipping is $3.00 per hat. If the customer orders one hat, I would like the shipping cost to be:
$3.00 + ($10.00 x 3%) = $3.30
If a customer orders 5 hats, the charge would be:
(($3.00 x 5) x 0.90) + ($10.00 x 5 x 3%) = $15.00
Is this possible??
-- Joomla version -- : 3.9.26
-- PHP version -- : 7.4.16
I am using the Manual Shipping plugin and shipping prices per product, which are entered for each product in the store. I would like to include a 10% discount on shipping when customers order more than one product. I would also like to add in a 3% charge (based on the total product cost in the order) to cover credit card transaction fees.
For example, I have a hat that costs $10.00 and the shipping is $3.00 per hat. If the customer orders one hat, I would like the shipping cost to be:
$3.00 + ($10.00 x 3%) = $3.30
If a customer orders 5 hats, the charge would be:
(($3.00 x 5) x 0.90) + ($10.00 x 5 x 3%) = $15.00
Is this possible??
Please Log in or Create an account to join the conversation.
5 years 4 months ago #332126
by nicolas
Replied by nicolas on topic Shipping calculation with multiple item discount and credit charge
Hi,
In your example it seems that the 10% shipping discount is only on the "shipping prices per product" and not the "3% charge to cover credit card transaction fees".
So I think it makes more sense to separate both parts and actually add the 3% fee in the "percentage" setting of your payment methods. That way, it will appear as a "payment fee" and the discount on shipping won't be on it.
Then, for the discount on the shipping, I would recommend you to do it with a coupon code. You could configure it to be auto loaded in the cart with a "minimum number of products" of 2 and a "shipping percentage" of 10%
That way the coupon will be automatically added to the cart above 2 products in the cart and its value will be 10% of the calculated shipping fee (which will be based on the shipping prices per products).
However, the fees will be split into 3 parts: the shipping fee, the coupon discount of 10% of the shipping fees, and the payment fees of 3%. Note also that the payment fees will be based off the total amount, not the subtotal amount ( note that the payment fees of your payment gateway are also based on that amount, not the subtotal so I think it's better that way).
In your example it seems that the 10% shipping discount is only on the "shipping prices per product" and not the "3% charge to cover credit card transaction fees".
So I think it makes more sense to separate both parts and actually add the 3% fee in the "percentage" setting of your payment methods. That way, it will appear as a "payment fee" and the discount on shipping won't be on it.
Then, for the discount on the shipping, I would recommend you to do it with a coupon code. You could configure it to be auto loaded in the cart with a "minimum number of products" of 2 and a "shipping percentage" of 10%
That way the coupon will be automatically added to the cart above 2 products in the cart and its value will be 10% of the calculated shipping fee (which will be based on the shipping prices per products).
However, the fees will be split into 3 parts: the shipping fee, the coupon discount of 10% of the shipping fees, and the payment fees of 3%. Note also that the payment fees will be based off the total amount, not the subtotal amount ( note that the payment fees of your payment gateway are also based on that amount, not the subtotal so I think it's better that way).
The following user(s) said Thank You: themagicbag
Please Log in or Create an account to join the conversation.
- themagicbag
-
Topic Author
- Offline
Less
More
- Posts: 13
- Thank you received: 0
5 years 4 months ago #332172
by themagicbag
Replied by themagicbag on topic Shipping calculation with multiple item discount and credit charge
Thank you for the help!!
Do you mean that the customer will see all three charges listed separately? If so, is there a way to combine these charges so that the customer only sees one charge, like "Shipping, Handling, Fees"?
Thanks!!
Do you mean that the customer will see all three charges listed separately? If so, is there a way to combine these charges so that the customer only sees one charge, like "Shipping, Handling, Fees"?
Thanks!!
Please Log in or Create an account to join the conversation.
- themagicbag
-
Topic Author
- Offline
Less
More
- Posts: 13
- Thank you received: 0
5 years 4 months ago #332188
by themagicbag
Replied by themagicbag on topic Shipping calculation with multiple item discount and credit charge
I made the changes and they work perfectly! Is there a way to combine the three amounts into one line, showing "Shipping & Handling" for the customer to see? (Image attached)
If not, how can I change the verbiage and order of how the lines show in the cart? I'd like it to be:
Shipping
Shipping Discount
Handling Fee
Thanks!!
If not, how can I change the verbiage and order of how the lines show in the cart? I'd like it to be:
Shipping
Shipping Discount
Handling Fee
Thanks!!
Please Log in or Create an account to join the conversation.
- themagicbag
-
Topic Author
- Offline
Less
More
- Posts: 13
- Thank you received: 0
5 years 4 months ago #332191
by themagicbag
Replied by themagicbag on topic Shipping calculation with multiple item discount and credit charge
Well, I wasn't able to combine them, but I found the following section in show_block_cart:
which I moved below the shipping section it proceeded. Worked!!
I also overwrote the HIKASHOP_COUPON and HIKASHOP_CHECKOUT_COUPON constants in my language overrides.
Code:
<?php
}
if(!empty($this->options['show_price']) && !empty($cart->coupon) && !empty($this->options['show_coupon'])) {
?>
<tr>
<td colspan="<?php echo $row_count - 2; ?>" class="hikashop_cart_empty_footer"></td>
<td id="hikashop_checkout_cart_coupon_title" class="hikashop_cart_coupon_title hikashop_cart_title"><?php
echo JText::_('HIKASHOP_COUPON');
?></td>
<td class="hikashop_cart_coupon_value" data-title="<?php echo JText::_('HIKASHOP_COUPON'); ?>">
<span class="hikashop_checkout_cart_coupon"><?php
if(empty($this->options['price_with_tax']))
echo $this->currencyClass->format(@$cart->coupon->discount_value_without_tax * -1, @$cart->coupon->discount_currency_id);
else
echo $this->currencyClass->format(@$cart->coupon->discount_value * -1, @$cart->coupon->discount_currency_id);
?></span>
</td>
</tr>
which I moved below the shipping section it proceeded. Worked!!
I also overwrote the HIKASHOP_COUPON and HIKASHOP_CHECKOUT_COUPON constants in my language overrides.
Please Log in or Create an account to join the conversation.
5 years 4 months ago #332177
by nicolas
Replied by nicolas on topic Shipping calculation with multiple item discount and credit charge
Hi,
If you only want one fee and not three separate that's not possible without developing a custom shipping plugin to manually calculate the amount of the fee like you want.
If you only want one fee and not three separate that's not possible without developing a custom shipping plugin to manually calculate the amount of the fee like you want.
The following user(s) said Thank You: themagicbag
Please Log in or Create an account to join the conversation.
- themagicbag
-
Topic Author
- Offline
Less
More
- Posts: 13
- Thank you received: 0
5 years 4 months ago #332207
by themagicbag
Replied by themagicbag on topic Shipping calculation with multiple item discount and credit charge
Hello!
I think I'm good with just rearranging and renaming items. I appreciate the help very much!!
I think I'm good with just rearranging and renaming items. I appreciate the help very much!!
Please Log in or Create an account to join the conversation.
Time to create page: 0.227 seconds