Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#8113 by Harpal Singh
29 May 2019, 05:56
I have added an additional setup charge for each product.
I am using PayPal and integrated successfully.
Now the problem is that I am unable to charge additional setup charge amount in Paypal.
Eg. I have order with PerItem price = $1.10 and Quantity=250 and Setup charges = $35
Total Amount would be calculated as : (1.10*250)+35 = 310 which is correct. and displaying correct also on detail page.
Image: https://prnt.sc/nuqmzi
When I proceed to Payment Page on Paypal it shows only (1.10*250) i.e $275.
Image: https://prnt.sc/nuqohz

I want to know how can I add additional charges in Paypal.
#8125 by Harpal Singh
03 Jun 2019, 05:54
aimeos wrote:How did you configure the additional setup charge? You use the PayPalExpress payment service, don't you?

Thanks for your reply.

I have taken a custom field in mshop_order_base_product as setup_charges and updating the same after checking out .
Thanks.
#8126 by aimeos
03 Jun 2019, 09:50
The field is unknown to the rest of the Aimeos code so this won't work if you don't adapt all code that should use the value from this field.

An easier solution would be to write a service provider decorator that adds the setup costs to the basket during checkout in either the delivery or payment selection step (if it's the only delivery option, the costs will be added immediately when adding a product by the Autofill basket plugin). You can add the costs not only as shipping or payment costs but also as delivery/payment related "product" line if you add the setup costs as delivery/payment price value instead of price costs.
#8128 by aimeos
03 Jun 2019, 17:28
Rebate values in the mshop_order_base table and mshop_order_base_product tables are only informations how much rebate have been granted. The prices already contain the rebate value.
#8133 by Harpal Singh
05 Jun 2019, 06:29
Is it possible to create a coupon for some products, to discount 40% on basket total?
If possible then how to add a single 40% discount coupon for multiple selected products?

How can I check if the coupon extension is installed?
I have added Coupon ABC in admin
Provider = PercentRebate
percentrebate.productcode = SSFLTEE(which is product code for the product on which coupon is applying)
percentrebate.rebate = 40 (as I want to give 40% rebate)
and added Code ABC
But when I have applied code ABC I Shows error message "Coupon code "ABC" is invalid or not available any more"
I have also used Provider as = PercentRebate,Required and required.productcode=SSFLTEE
But getting the same error message.
#8135 by aimeos
05 Jun 2019, 08:04
The SKU referenced in "percentrebate.productcode" must be the discount product which will be additionally added to the basket and will contain the rebate amount, e.g. -40$ (use SKU "demo-rebate" for this if the product is still available). It's not the product that must be in the basket so the coupon code can be applied (this is "required.productcode: SSFLTEE").

The correct configuration for "PercentRebate,Required" in provider would be:
percentrebate.productcode: demo-rebate
percentrebate.rebate: 40
required.productcode: SSFLTEE

Then, customers will get 40% rebate on the basket value if product with the SKU "SSFLTEE" is in their basket and they use the coupon code "ABC".
#8136 by Harpal Singh
05 Jun 2019, 10:56
HI,
Thanks again for your reply,

Ok I got it and followed the same. Somehow I got the discounted amount. But it shows an error on the top when coupon is applied.

Did you mean I have to add separate coupon for each product. With configuration code required.productcode: SSFLTEE? or is there any way to add a single coupon for same discount for some of the products.

Can I apply that coupon automatically when product is added in the basket?

Thanks
Harpal Singh
Attachments
screenshot-dev.aztex.com-2019.06.05-16-01-51.png
screenshot-dev.aztex.com-2019.06.05-16-01-51.png (40.96 KiB) Viewed 162 times