[vQmod] Regular and Discount Prices 1.5.x
32 posts
• Page 1 of 2 • 1, 2
[vQmod] Regular and Discount Prices 1.5.x
Following from this thread: http://forum.opencart.com/viewtopic.php?f=22&t=22341, and at i2Paq's request, here's the vQmod to show the discounted amount and the percentage saved for special offer products and discounts.

If you're not living on the edge ... you're taking up too much space!
Multi-Vendor Plugin for OpenCart 1.5.1.x
Have I helped you?
-

fido-x - Posts: 1960
- Joined: Fri Jun 27, 2008 5:09 pm
- Location: Tasmania, Australia
Re: [vQmod] Regular and Discount Prices 1.5.x
I think that a donation is well deserved: Done.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
First Things First: Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
Problemen met de BTW?: [How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
First Things First: Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
Problemen met de BTW?: [How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9773
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: [vQmod] Regular and Discount Prices 1.5.x
Thanks. Muchly appreciated.

If you're not living on the edge ... you're taking up too much space!
Multi-Vendor Plugin for OpenCart 1.5.1.x
Have I helped you?
-

fido-x - Posts: 1960
- Joined: Fri Jun 27, 2008 5:09 pm
- Location: Tasmania, Australia
Re: [vQmod] Regular and Discount Prices 1.5.x
May you show a screenshot of what this does exactly?
- Jackcohen
- Posts: 127
- Joined: Sun Aug 07, 2011 5:08 am
Re: [vQmod] Regular and Discount Prices 1.5.x
Jackcohen wrote:May you show a screenshot of what this does exactly?
Normal Price
Special Price
Money Saved
Discount Percentage
- Attachments
-
- ScreenHunter_01 Aug. 28 21.05.gif (2.35 KiB) Viewed 5936 times
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
First Things First: Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
Problemen met de BTW?: [How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
First Things First: Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
Problemen met de BTW?: [How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9773
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: [vQmod] Regular and Discount Prices 1.5.x
Thanks alot for this... Really a great module...
- mkh
- Posts: 29
- Joined: Thu Jun 23, 2011 5:55 pm
Re: [vQmod] Regular and Discount Prices 1.5.x
Thanks fido-x
Will try it when I get back.
Will try it when I get back.
-

Maansy - Posts: 930
- Joined: Wed Jun 23, 2010 10:04 pm
Re: [vQmod] Regular and Discount Prices 1.5.x
Can anyone help me to add this to more languages? It works for english but when I copy code from english and use it for another languaget it simply disappear.
I made this:
I made this:
- Code: Select all
<modification>
<id>Product Discount</id>
<version>1.0.0</version>
<vqmver>1.2.3</vqmver>
<author>Fido-X</author>
<file name="catalog/controller/product/product.php">
<operation>
<search position="after"><![CDATA[
$this->data['text_tags'] = $this->language->get('text_tags');
]]></search>
<add><![CDATA[
// Added for discounts
$this->data['text_discounted'] = $this->language->get('text_discounted');
$this->data['text_percent_saved'] = $this->language->get('text_percent_saved');
// End discounts addition
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));
]]></search>
<add><![CDATA[
// Added for discounts
$this->data['discount_amount'] = $this->currency->format($this->tax->calculate(($product_info['price'] - $product_info['special']), $product_info['tax_class_id'], $this->config->get('config_tax')));
$this->data['percent_savings'] = round((($product_info['price'] - $product_info['special']) / $product_info['price'] * 100));
// End discounts addition
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
foreach ($discounts as $discount) {
]]></search>
<add><![CDATA[
// Added for discounts
$discount_amount = $this->currency->format($this->tax->calculate(($product_info['price'] - $discount['price']), $product_info['tax_class_id'], $this->config->get('config_tax')));
$discount_amount = $this->currency->format($product_info['price'] - $discount['price']);
$percent_savings = round((($product_info['price'] - $discount['price']) / $product_info['price'] * 100));
// End discounts addition
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
'quantity' => $discount['quantity'],
]]></search>
<add><![CDATA[
// Added for discounts
'discount_amount' => $discount_amount,
'percent_savings' => $percent_savings,
// End discounts addition
]]></add>
</operation>
</file>
<file name="catalog/language/english/product/product.php">
<operation>
<search position="before" index="1"><![CDATA[
// Entry
]]></search>
<add><![CDATA[
// Added for discounts
$_['text_discounted'] = 'Discount:';
$_['text_percent_saved'] = 'Save:';
]]></add>
</operation>
</file>
[color=#FF0000]<file name="catalog/language/czech/product/product.php">
<operation>
<search position="before" index="1"><![CDATA[
// Entry
]]></search>
<add><![CDATA[
// Added for discounts
$_['text_discounted'] = 'Ušetříte:';
$_['text_percent_saved'] = 'Sleva:';
]]></add>
</operation>
</file> [/color]
<file name="catalog/view/theme/default/template/product/product.tpl">
<operation>
<search position="after" index="1"><![CDATA[
<span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
]]></search>
<add><![CDATA[
<!-- Discounted price -->
<table>
<tr>
<td style="width: 80px;"><?php echo $text_discounted; ?></td>
<td><?php echo $discount_amount; ?></td>
</tr>
<tr>
<td><?php echo $text_percent_saved; ?></td>
<td><?php echo $percent_savings; ?>%</td>
</tr>
</table>
<!-- End discounted price -->
]]></add>
</operation>
<operation>
<search position="after" index="1"><![CDATA[
<?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
]]></search>
<add><![CDATA[
<!-- Discounted price -->
<table>
<tr>
<td style="width: 80px;"><?php echo $text_discounted; ?></td>
<td><?php echo $discount['discount_amount']; ?></td>
</tr>
<tr>
<td><?php echo $text_percent_saved; ?></td>
<td><?php echo $discount['percent_savings']; ?>%</td>
</tr>
</table>
<!-- End discounted price -->
]]></add>
</operation>
</file>
</modification>
- Code: Select all
<file name="catalog/language/czech/product/product.php">
<operation>
<search position="before" index="1"><![CDATA[
// Entry
]]></search>
<add><![CDATA[
// Added for discounts
$_['text_discounted'] = 'Ušetříte:';
$_['text_percent_saved'] = 'Sleva:';
]]></add>
</operation>
</file>
- Flap
- Posts: 9
- Joined: Thu Sep 08, 2011 1:51 pm
Re: [vQmod] Regular and Discount Prices 1.5.x
Very nice one,just must have!
thank you.
thank you.
-

Eva30 - Posts: 30
- Joined: Fri Sep 09, 2011 8:17 am
Re: [vQmod] Regular and Discount Prices 1.5.x
Hi i presume you put this in the vqmod/xml folder?
once it's install how do you do the discount thing?
thanks
once it's install how do you do the discount thing?
thanks
- smitch6
- Posts: 155
- Joined: Sat Sep 17, 2011 6:46 am
Re: [vQmod] Regular and Discount Prices 1.5.x
can anyone help with this please 

- smitch6
- Posts: 155
- Joined: Sat Sep 17, 2011 6:46 am
Re: [vQmod] Regular and Discount Prices 1.5.x
Go under product -> click on Special tab -> add your special price amount -> save
Go to your site and click on the product.. you should see a regular and discounted value -> with the discounted %
Go to your site and click on the product.. you should see a regular and discounted value -> with the discounted %
- terrier
- Posts: 27
- Joined: Wed Aug 31, 2011 11:05 am
Re: [vQmod] Regular and Discount Prices 1.5.x
brill thanks 

- smitch6
- Posts: 155
- Joined: Sat Sep 17, 2011 6:46 am
Re: [vQmod] Regular and Discount Prices 1.5.x
Flap wrote:Can anyone help me to add this to more languages? It works for english but when I copy code from english and use it for another languaget it simply disappear.
I made this:
- Code: Select all
<modification>
<id>Product Discount</id>
<version>1.0.0</version>
<vqmver>1.2.3</vqmver>
<author>Fido-X</author>
<file name="catalog/controller/product/product.php">
<operation>
<search position="after"><![CDATA[
$this->data['text_tags'] = $this->language->get('text_tags');
]]></search>
<add><![CDATA[
// Added for discounts
$this->data['text_discounted'] = $this->language->get('text_discounted');
$this->data['text_percent_saved'] = $this->language->get('text_percent_saved');
// End discounts addition
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
$this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')));
]]></search>
<add><![CDATA[
// Added for discounts
$this->data['discount_amount'] = $this->currency->format($this->tax->calculate(($product_info['price'] - $product_info['special']), $product_info['tax_class_id'], $this->config->get('config_tax')));
$this->data['percent_savings'] = round((($product_info['price'] - $product_info['special']) / $product_info['price'] * 100));
// End discounts addition
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
foreach ($discounts as $discount) {
]]></search>
<add><![CDATA[
// Added for discounts
$discount_amount = $this->currency->format($this->tax->calculate(($product_info['price'] - $discount['price']), $product_info['tax_class_id'], $this->config->get('config_tax')));
$discount_amount = $this->currency->format($product_info['price'] - $discount['price']);
$percent_savings = round((($product_info['price'] - $discount['price']) / $product_info['price'] * 100));
// End discounts addition
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
'quantity' => $discount['quantity'],
]]></search>
<add><![CDATA[
// Added for discounts
'discount_amount' => $discount_amount,
'percent_savings' => $percent_savings,
// End discounts addition
]]></add>
</operation>
</file>
<file name="catalog/language/english/product/product.php">
<operation>
<search position="before" index="1"><![CDATA[
// Entry
]]></search>
<add><![CDATA[
// Added for discounts
$_['text_discounted'] = 'Discount:';
$_['text_percent_saved'] = 'Save:';
]]></add>
</operation>
</file>
[color=#FF0000]<file name="catalog/language/czech/product/product.php">
<operation>
<search position="before" index="1"><![CDATA[
// Entry
]]></search>
<add><![CDATA[
// Added for discounts
$_['text_discounted'] = 'Ušetříte:';
$_['text_percent_saved'] = 'Sleva:';
]]></add>
</operation>
</file> [/color]
<file name="catalog/view/theme/default/template/product/product.tpl">
<operation>
<search position="after" index="1"><![CDATA[
<span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
]]></search>
<add><![CDATA[
<!-- Discounted price -->
<table>
<tr>
<td style="width: 80px;"><?php echo $text_discounted; ?></td>
<td><?php echo $discount_amount; ?></td>
</tr>
<tr>
<td><?php echo $text_percent_saved; ?></td>
<td><?php echo $percent_savings; ?>%</td>
</tr>
</table>
<!-- End discounted price -->
]]></add>
</operation>
<operation>
<search position="after" index="1"><![CDATA[
<?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
]]></search>
<add><![CDATA[
<!-- Discounted price -->
<table>
<tr>
<td style="width: 80px;"><?php echo $text_discounted; ?></td>
<td><?php echo $discount['discount_amount']; ?></td>
</tr>
<tr>
<td><?php echo $text_percent_saved; ?></td>
<td><?php echo $discount['percent_savings']; ?>%</td>
</tr>
</table>
<!-- End discounted price -->
]]></add>
</operation>
</file>
</modification>
- Code: Select all
<file name="catalog/language/czech/product/product.php">
<operation>
<search position="before" index="1"><![CDATA[
// Entry
]]></search>
<add><![CDATA[
// Added for discounts
$_['text_discounted'] = 'Ušetříte:';
$_['text_percent_saved'] = 'Sleva:';
]]></add>
</operation>
</file>
how to make it multi lang?
(FR, NL, EN, DE, IT)
or maybe there is some way to make all vQmods multi lang?
most of the time some thinks are missing with translations (text_here, something_here) if you know what i mean.
-

Eva30 - Posts: 30
- Joined: Fri Sep 09, 2011 8:17 am
Re: [vQmod] Regular and Discount Prices 1.5.x
Yeah, I was also wondering about using this for other languages that English... ANyone got a solution for that?
- prodac
- Posts: 9
- Joined: Tue Oct 25, 2011 11:37 pm
Re: [vQmod] Regular and Discount Prices 1.5.x
I am not an expert, but it should be as easy as copying and pasting the language parts and changing the path to your custom language. If it is not working that way, then you need to check your language file, the code in the search tag might be different or not present in your language file; Therefore, vqmod is not finding the line and obviously not adding the code. Try changing...
TO...
This way it works with any language file, and will add the code just after the opening tag.
- Code: Select all
<search position="before" index="1"><![CDATA[
// Entry
]]></search>
TO...
- Code: Select all
<search position="after"><![CDATA[
<?php
]]></search>
This way it works with any language file, and will add the code just after the opening tag.
You want to thank me for my time!
Click here to donate
Click here to donate- marvmen21
- Posts: 364
- Joined: Mon Nov 08, 2010 8:54 pm
Re: [vQmod] Regular and Discount Prices 1.5.x
I fixed the language problem by replacing the language name and the theme name in the xml file 

- prodac
- Posts: 9
- Joined: Tue Oct 25, 2011 11:37 pm
Re: [vQmod] Regular and Discount Prices 1.5.x
Hi...
excellent mod... I'm using OC 1.5.1.1 and Shoppica.net 1.0.9 (August release) theme.
Uploaded the XML file to the vqmod\xml folder but the discount absolute amount and discount % is not shown on the product page.
Does anyone who has successfully installed the module with Shoppica help?
Thanks, Vick
PS Would also like to know the PP to make a small donation.
excellent mod... I'm using OC 1.5.1.1 and Shoppica.net 1.0.9 (August release) theme.
Uploaded the XML file to the vqmod\xml folder but the discount absolute amount and discount % is not shown on the product page.
Does anyone who has successfully installed the module with Shoppica help?
Thanks, Vick
PS Would also like to know the PP to make a small donation.
- vickiowa
- Posts: 18
- Joined: Mon Sep 26, 2011 10:16 pm
Re: [vQmod] Regular and Discount Prices 1.5.x
I have the same issue as vickiowa
- wired-circuit
- Posts: 27
- Joined: Thu Mar 24, 2011 6:48 am
Re: [vQmod] Regular and Discount Prices 1.5.x
Can this mod be adjusted for 'Featured module' ? Because I tried it just for the percentage saving and it shows the same percentage for all the products in the featured area.
A little help would be appreciated.
Thank you very much.
A little help would be appreciated.
Thank you very much.
- snoopster
- Posts: 12
- Joined: Sun Nov 27, 2011 11:06 pm
32 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: f1br3opt1c and 7 guests













