- Posts: 265
- Thank you received: 1
Paypal Payment Plugin & Userpoints Compatibility
- Holmes-Pierce
-
Topic Author
- Offline
Less
More
11 years 3 months ago #206828
by Holmes-Pierce
Paypal Payment Plugin & Userpoints Compatibility was created by Holmes-Pierce
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
Hello,
Within the specific configuration of the 'Paypal Payment Plugin', If I set 'Send order details' to 'Yes'. It sends the full price to Paypal, rather than a discount price achieved with loyalty points.
For example, I have 50 points worth £5, the product is valued at £25. At the front-end of the website hikashop recognises the discount available and takes off the £5 to give a sub-total of £20. Then continue to Paypal and it's back to £25.
If I set 'Send order details' to no then it works and gives the appropriate discount, but then I have no order details at Paypal.
It's important for me to be able to push these details to Paypal as I know that it has recently caused a bit of confusion for my customers. Could you please help?
Many thanks,
Hal
-- Joomla version -- : 3.4.1
Hello,
Within the specific configuration of the 'Paypal Payment Plugin', If I set 'Send order details' to 'Yes'. It sends the full price to Paypal, rather than a discount price achieved with loyalty points.
For example, I have 50 points worth £5, the product is valued at £25. At the front-end of the website hikashop recognises the discount available and takes off the £5 to give a sub-total of £20. Then continue to Paypal and it's back to £25.
If I set 'Send order details' to no then it works and gives the appropriate discount, but then I have no order details at Paypal.
It's important for me to be able to push these details to Paypal as I know that it has recently caused a bit of confusion for my customers. Could you please help?
Many thanks,
Hal
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206847
by nicolas
Replied by nicolas on topic Paypal Payment Plugin & Userpoints Compatibility
Hi,
The points system uses the "additional data" system of HikaShop which allows a plugin to insert extra lines to the cart/order between the subtotal and the total.
PayPal doesn't offer the possibility to add such extra lines.
What we can try is to add them as item rows.
Try to add the code:
before the line:
in the file plugins/hikashoppayment/paypal/paypal.php and test it.
Let us know how it goes. If it works, we could include that by default in HikaShop.
The points system uses the "additional data" system of HikaShop which allows a plugin to insert extra lines to the cart/order between the subtotal and the total.
PayPal doesn't offer the possibility to add such extra lines.
What we can try is to add them as item rows.
Try to add the code:
Code:
foreach($order->cart->additional as $product) {
if(empty($product->price_value)) continue;
$vars['item_name_' . $i] = substr(strip_tags($product->name), 0, 127);
$vars['item_number_' . $i] = 'order additional';
$vars['amount_'.$i] = round($product->price_value, (int)$this->currency->currency_locale['int_frac_digits']);
$vars['quantity_' . $i] = 1;
$i++;
}
Code:
if(!empty($order->order_shipping_price) && bccomp($order->order_shipping_price, 0, 5)) {
Let us know how it goes. If it works, we could include that by default in HikaShop.
Please Log in or Create an account to join the conversation.
- Holmes-Pierce
-
Topic Author
- Offline
Less
More
- Posts: 265
- Thank you received: 1
11 years 3 months ago #206918
by Holmes-Pierce
Replied by Holmes-Pierce on topic Paypal Payment Plugin & Userpoints Compatibility
Hello,
I tried, but unfortunately I didn't have any success.
However, I notice that when I use a coupon that the discount is applied no problem. Is there any way to include it on this line? I have attached a screenshot.
Many thanks,
Hal
I tried, but unfortunately I didn't have any success.
However, I notice that when I use a coupon that the discount is applied no problem. Is there any way to include it on this line? I have attached a screenshot.
Many thanks,
Hal
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206984
by nicolas
Replied by nicolas on topic Paypal Payment Plugin & Userpoints Compatibility
Hi,
Please provide a FTP access to the website, a user account with points, the procedure to reproduce the issue and a link to this thread via our contact form so that we can debug the issue.
www.hikashop.com/support/contact-us.html
Please provide a FTP access to the website, a user account with points, the procedure to reproduce the issue and a link to this thread via our contact form so that we can debug the issue.
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
- Holmes-Pierce
-
Topic Author
- Offline
Less
More
- Posts: 265
- Thank you received: 1
11 years 3 months ago #207071
by Holmes-Pierce
Replied by Holmes-Pierce on topic Paypal Payment Plugin & Userpoints Compatibility
Thanks for your help.
I've set that all up, I used the subject box for a link to this thread.
Thanks again,
Hal
I've set that all up, I used the subject box for a link to this thread.
Thanks again,
Hal
Please Log in or Create an account to join the conversation.
11 years 3 months ago #207350
by nicolas
Replied by nicolas on topic Paypal Payment Plugin & Userpoints Compatibility
Hi,
As I had expected that code cannot work as you can't give to paypal products with negative prices.
I've made an additional patch to pass the point discount as a normal coupon to PayPal.
It seems to work fine now.
As I had expected that code cannot work as you can't give to paypal products with negative prices.
I've made an additional patch to pass the point discount as a normal coupon to PayPal.
It seems to work fine now.
Please Log in or Create an account to join the conversation.
Time to create page: 0.273 seconds