Display full price and monthly payment cost

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
3 years 1 month ago #339405

-- HikaShop version -- : 4.4.2

Hi

We have a payment plugin that allows people to checkout a product and then pay of the amount over 12 months via a loan.
Is it possible to display two prices for example
Purchase Price $500 or $50 per month of 12 months

Thank you

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 years 1 month ago #339407

Hi,

When you edit the file product / listing_price.php via the menu Display>Views, you have this line of code which displays the price with taxes of the product on the product page (and on the listings):

echo $this->currencyHelper->format(@$price->price_value_with_tax, $price->price_currency_id);
So supposing that you want that change on both listings and the product page for all the products, you could change that line to:
echo 'Purchase Price '.$this->currencyHelper->format(@$price->price_value_with_tax, $price->price_currency_id). ' or '.$this->currencyHelper->format(@$price->price_value_with_tax/10, $price->price_currency_id).' per month of 12 months';

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

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
3 years 1 month ago #339416

Thank you, I will give it a try, will this work for when you insert a product into an article as well ?

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 years 1 month ago #339417

Yes it will

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

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
3 years 3 weeks ago #339466

Thank you for the coding, I have tried it and it works as expected.

Just a question is there any way to apply this to specific products?
What do I need to do for the changes to not display in the cart as well, I basically want this price modification to show on product pages and in articles.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 years 3 weeks ago #339468

Hi,

You can do like that:

if(empty($this->cart_product_price)) {
 if($this->row->xxx == 'yes') {
  echo 'Purchase Price '.$this->currencyHelper->format(@$price->price_value_with_tax, $price->price_currency_id). ' or '.$this->currencyHelper->format(@$price->price_value_with_tax/10, $price->price_currency_id).' per month of 12 months';
 }else {
  echo $this->currencyHelper->format(@$price->price_value_with_tax, $price->price_currency_id);
 }
}
where xxx is the column name of a custom field of the table "product" and of the type "single dropdown" with two values "yes" and "no" to display or not the monthly payment cost.

The following user(s) said Thank You: SnoozeULooze.co.za

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

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
3 years 3 weeks ago #339547

Wow, Thank you Nicolas

It works perfectly for what I wanted to achieve.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum