Display credit

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
Hi Nop Fam
I am not good with coding but I want to display a total amount and a credit amount on product details.

I want to use a source called Mobicred (mobicred.co.za) which customers can be able to purchase in credit amount.
You can check their guides on https://app.mobicredwidget.co.za/guides/widgets/instalment

I was using Opencart and migrated to NopCommerce which I am not good at.
Please assist me.
2 years ago
You may be interested in see if any plugins for mobicred are in the marketplace.

I don't think it's enough to just display a widget showing the installment amount.  I would think that you would need to be able to use their API do the initial debit and subsequent (recurring) debits.
2 years ago
I am using that plugin as my store payment method and have the mobicred  ID's.
but now the problem is a customer has to
1) Add to Cart
2) Fill the credentials
3) Choose payfast as a payment method
4) Then check the installment pricing.

That is a long process.

The aim is to display the installment pricing next to the actual pricing
2 years ago
You could ask the developer to add functionality to his plugin to display the installment info.

Otherwise, use instructions from the link you provided above to get the script code, etc. and then
you can modify Product Templates
\Views\Product\ProductTemplate.Simple.cshtml
\Views\Product\ProductTemplate.Grouped.cshtml

Or, you can use one of the "HTML anywhere" type plugins (example in marketplace), as there are many Widget Zones in there - examples
PublicWidgetZones.ProductDetailsOverviewTop
PublicWidgetZones.ProductDetailsOverviewTop
PublicWidgetZones.ProductDetailsInsideOverviewButtonsBefore
PublicWidgetZones.ProductDetailsInsideOverviewButtonsBefore
PublicWidgetZones.ProductDetailsInsideOverviewButtonsAfter
PublicWidgetZones.ProductDetailsInsideOverviewButtonsAfter
PublicWidgetZones.ProductDetailsOverviewBottom
PublicWidgetZones.ProductDetailsOverviewBottom
2 years ago
Thank you very much.

Now I managed to display it in the product details through editing  _ProductPrice.cshtml.
But the problem is I am unable to pass a Total price variable in the HTML div data-amount
e.g <div data-amount="1000"> <div> would display Credit: $92 on the website.

is there a way or variable I can be able to use on the data-amount that can get a total amount of the product?
2 years ago
(UPDATED)

Try

<div data-amount="@Html.Raw(Model.Price)">
2 years ago
Well, it did not work.

It says I need to fetch the price from the database.

OPencart would be: data-amount="<?php echo $price;?>"
Wordpress would be: data-amount="<?php echo the_field('product_price') ;?>"
Prestashop would be: data-amount="{$productPrice}"
Magento would be: data-amount="$this->getFinalPrice();"
2 years ago
Diketso wrote:
Well, it did not work.

It says I need to fetch the price from the database.

OPencart would be: data-amount="<?php echo $price;?>"
Wordpress would be: data-amount="<?php echo the_field('product_price') ;?>"
Prestashop would be: data-amount="{$productPrice}"
Magento would be: data-amount="$this->getFinalPrice();"


It actually worked with the data-amount="@Html.Raw(Model.Price)", The problem was the data amount is only taking integers so the currency symbol was causing it not to work. I had to custom format the currency. Thank you.
2 years ago
Try this (rounds up to next integer):

data-amount="@Math.Ceiling(Model.PriceValue)"
2 years ago
It worked like magic. Thank you very much.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.