Post by domivin » Sun Apr 30, 2017 3:43 am

Hy,
how to display below the price a code php for display the price in 3 times
if price is 1200 € , display below the price :
3 X 400 €

Thanks
Mike

Version 2.1.0.1
Hébergement LWS
Template default modified
Multimerch modified


New member

Posts

Joined
Thu Nov 13, 2014 3:06 am

Post by opencartmart » Mon May 01, 2017 1:42 am

You will have to modify two files.

1. In the file, catalog/controller/product/product.php, find following line:

Code: Select all

$discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']);
Now add following line of code before that:

Code: Select all

$data['installment_price'] =  '3x'. $product_info['special'] ? round($product_info['special']/3) : round($product_info['price']/3);
2. In the file catalog/view/theme/YOUR_THEME/template/product/product.tpl, find <?php if ($tax) { ?> and add your formated html code for showing that. It could be following in default theme:

Code: Select all

 <li>
              <h2><?php echo $installment_price; ?></h2>
            </li>
<?php if ($tax) { ?> code can be different in your theme.

Noted that you must use ocmod or vqmod for file modification
Last edited by opencartmart on Thu May 04, 2017 11:48 pm, edited 1 time in total.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by domivin » Wed May 03, 2017 2:21 am

Thanks

but i get this error

Parse error: syntax error, unexpected ''x'' (T_CONSTANT_ENCAPSED_STRING) in /htdocs/vqmod/vqcache/vq2-catalog_controller_product_product.php on line 344

Mike

Version 2.1.0.1
Hébergement LWS
Template default modified
Multimerch modified


New member

Posts

Joined
Thu Nov 13, 2014 3:06 am

Post by opencartmart » Thu May 04, 2017 11:49 pm

Sorry, there was a typo, I have updated answer.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by domivin » Fri May 05, 2017 12:52 pm

Thanks
works well
Mike

Version 2.1.0.1
Hébergement LWS
Template default modified
Multimerch modified


New member

Posts

Joined
Thu Nov 13, 2014 3:06 am

Post by opencartmart » Fri May 05, 2017 1:23 pm

Glad to hear. Thank you.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am
Who is online

Users browsing this forum: No registered users and 108 guests