Show Gross Amount not Price in Subscription Plan module?

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago - 3 years 6 months ago #149871 by Martin Beaumont
Hi Tuan,

Is is possible to adjust the Subscription Plan module to show either the Gross Amount or the sum of the SetupFee and Price (excluding the Payment Fee) ?

See screenshot mock up. I would imagine a template override, and looking at  membershipprodoc.joomservices.com/develo...ion/customize-layout is seems I need to use components/com_osmembership/view/common/tmpl/pricingtable_circle_plans.php

However I'm unsure if I can get the value I need which is Gross Price excluding Payment Fee also calculated by Setup Fee + Price. FYI - This is just for display purposes only.

 

Thanks,

 
Last edit: 3 years 6 months ago by Martin Beaumont. Reason: Question clarification

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #149875 by Tuan Pham Ngoc
Hello

You're right that you need to modify code in the file components/com_osmembership/view/common/tmpl/pricingtable_plans.php . If I understand correctly, you can can modify the line 159 from:
Code:
echo str_replace('.01', '.00', OSMembershipHelper::formatCurrency($item->price, $config, $symbol));

To
Code:
echo str_replace('.01', '.00', OSMembershipHelper::formatCurrency($item->price + $item->setup_fee, $config, $symbol));

Once the modification is done, you should move the modified file to PATH_TO_TEMPLATE/html/com_osmembership/common folder so that the change won't be lost when you update to future releases of the extension

PATH_TO_TEMPLATE is path to the template which you are using on your site

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #149894 by Martin Beaumont
Replied by Martin Beaumont on topic Show Gross Amount not Price in Subscription Plan module?
Thanks Tuan,

I've made the change per your suggestion and I don't see any front end change? It is possible that as I'm using pricingtable_circle_plans.php I need to make changes to that file as well/instead?

I don't see the code 
Code:
echo str_replace('.01', '.00', OSMembershipHelper::formatCurrency($item->price, $config, $symbol));

in the pricingtable_circle_plans.php file but of course it's in pricingtable_plans.php which I have over ridden per your instructions.

Thanks for your help.
Martin

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #149895 by Tuan Pham Ngoc
Hello Martin

I thought you are using Pricing Table Layout. If you are using a different layout, a different file will need to be changed

Could you please send us link to the page (or screenshot of that page). We will tell you the correct file and guide you with the code

Tuan
The following user(s) said Thank You: Martin Beaumont

Please Log in or Create an account to join the conversation.

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #149902 by Martin Beaumont
Replied by Martin Beaumont on topic Show Gross Amount not Price in Subscription Plan module?
Hi Tuan,

URL in ticket #117994 FYI.

I'm using pricingtable_circle_plans.php layout - apologies for any confusion.

Thanks,

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #149905 by Tuan Pham Ngoc
Hello

The file you need to modify is components/com_osmembership/view/common/tmpl/pricingtable_circle_plans.php . You need to change the code in that file from:
Code:
if ($config->currency_position == 0) { echo $symbol . number_format($item->price + $item->setup_fee, $numberDecimals, $dec_point, $thousands_sep) . ($subscriptionLengthText ? "<sub>/$subscriptionLengthText</sub>" : ''); } else { echo number_format($item->price + $item->setup_fee, $numberDecimals, $dec_point, $thousands_sep) . $symbol . ($subscriptionLengthText ? "<sub>/$subscriptionLengthText</sub>" : ''); }
The following user(s) said Thank You: Martin Beaumont

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #149906 by Tuan Pham Ngoc
Please note that once the modification is done, you should move the modified file to templates/numodusversus/html/com_osmembership/common folder so that the change won't be lost when you update to future releases of the extension

(That's called Template override in Joomla)

Regards,

Tuan
The following user(s) said Thank You: Martin Beaumont

Please Log in or Create an account to join the conversation.

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #149921 by Martin Beaumont
Replied by Martin Beaumont on topic Show Gross Amount not Price in Subscription Plan module?
Thanks Tuan,

Worked perfectly! Thanks again for your great support.

Regards
Martin

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #149925 by Tuan Pham Ngoc
Great. Happy to hear that and thanks for the update

Regards,

Tuan

Please Log in or Create an account to join the conversation.