Post by HealthWyze » Tue May 01, 2018 11:34 pm

I want to have a product in my store for recurring donations. The base product should be "zero", then they should be able to choose from a drop-down list, a variety of options ($10/month, $20/month, etc.). I set up recurring payments in accordance with this idea. However, when they go to checkout, the item price is still zero, when the subscription price should be added to the base price. Does anyone have a fix for this? An extension? Anything?

Here are a couple of screenshots to help demonstrate the issue:

Image

Image

Newbie

Posts

Joined
Fri Oct 24, 2014 10:23 am


Post by IP_CAM » Wed May 02, 2018 7:55 am

Well, this would probably require a Pro, to solve it, you should better have
placed it in the commercial Section. But some Extensions possibly exist for
this, as it looks.
Good Luck ;)
Ernie
---
Product Subscriptions - Recurring Payments
https://www.opencart.com/index.php?rout ... on_id=9890
---
Front End Recurring Product Subscription
https://www.opencart.com/index.php?rout ... n_id=30725
---

For Sale: Top URL's, including OpenCart V-Pro installed, like seen here:
http://www.bigmax.ch - http://www.ipcam.li - http://www.opencart.li
For Information + URL's offered, please contact me at: jti@jacob.ch
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories: https://github.com/IP-CAM
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by HealthWyze » Wed May 02, 2018 11:36 pm

Anybody who finds this thread in the future would probably benefit from knowing how to fix this. In Opencart 2.3.0.2, you must edit this file:
system/library/cart/cart.php

Replace:

Code: Select all

'price'           => ($price + $option_price),
 'total'           => ($price + $option_price) * $cart['quantity'],
With this:

Code: Select all

'price' => ($price + $recurring['price'] + $option_price),
'total' => ($price + $recurring['price'] + $option_price) * $cart['quantity'],
Be aware that you need to have a trial period if you do this, else the customer will be double charged (once for the price of the product, once for the subscription).

Newbie

Posts

Joined
Fri Oct 24, 2014 10:23 am


Post by PiBROS » Sun Sep 09, 2018 10:49 pm

Thanks!
This tip was indeed extremely helpful for me where the selling price depends on the chosen recurring profile.
So I changed system/library/cart/cart.php to:

'price' => ($recurring['price'] + $option_price),
'total' => ($recurring['price'] + $option_price) * $cart['quantity'],

Newbie

Posts

Joined
Thu Sep 06, 2018 4:32 pm
Who is online

Users browsing this forum: No registered users and 9 guests