products in promotion

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Oct 31, 2014 9:20 am
Reply with quote
Report this post
Hello

I would like to distinguish photos with products in promotion, select the old price, distinguish the new. How can I do it?
User avatar
Junior Boarder

teitbite
Sat Nov 01, 2014 10:57 am
Reply with quote
Report this post
User avatar
Moderator

GK User
Mon Jan 19, 2015 12:09 pm
Reply with quote
Report this post
ok, I added code:

teitbite wrote:
Please edit file /html/com_virtuemart/category/default.php, look for line 196 which should looks like:

Code: Select all
                  if ($this->show_prices == '1') {


and add this code below:

Code: Select all
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
               echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
            }


but where I have to add a new price?
User avatar
Junior Boarder

teitbite
Wed Jan 21, 2015 8:20 am
Reply with quote
Report this post
Hi

You just need to add a discount or a sales value. VM will count the new price on it's own. I'm not a VM expert so I do not know how it is done exactly, for this You will need to contact VM support.
User avatar
Moderator

GK User
Wed Jan 28, 2015 2:58 pm
Reply with quote
Report this post
Anyone? Any idea? Please :)

I tried a lot of possibilities :( nothing works :(
User avatar
Junior Boarder

teitbite
Fri Jan 30, 2015 1:07 pm
Reply with quote
Report this post
Hi

Please send me an access to joomla panel and ftp. I'll just make it for You. Tell me the url to the page You want this price to appear.
User avatar
Moderator

teitbite
Tue Feb 03, 2015 1:07 pm
Reply with quote
Report this post
Hi

I got an access to joomla panel from You, but crucial here is an ftp access, otherwise I'm not able to make any changes. Also an URL to the exact page where You want this prices and You are sure products will have a discount so I can use it as example.
User avatar
Moderator

GK User
Fri Feb 13, 2015 8:56 am
Reply with quote
Report this post
Hello

I forgot about ftp, I sent PM
User avatar
Junior Boarder

teitbite
Sat Feb 14, 2015 10:03 am
Reply with quote
Report this post
Hi

I got it, but there is no discounted products so I have nothing to test it on. Can You please tell me the url to the category where I will be able to see at least one ?
User avatar
Moderator

GK User
Thu Feb 19, 2015 7:27 pm
Reply with quote
Report this post
You can change any of the product. This is a test site
User avatar
Junior Boarder

teitbite
Sat Feb 21, 2015 1:39 pm
Reply with quote
Report this post
Hi

Here is the code You need to add over the price into /html/com_virtuemart/category/default.php

Code: Select all
                     if ( $product->prices['basePrice'] != $product->prices['salesPrice']) {
                                    echo '<span class="price-crossed" style="text-decoration: line-through;">' . $this->currency->createPriceDiv ('basePrice', '', $product->prices) . "</span>";
                              }




TAG: PRICE CROSSED VM
User avatar
Moderator

GK User
Mon Feb 23, 2015 1:41 pm
Reply with quote
Report this post
Thank you :)

It works perfectly in category view. How do I get the same in product view?
User avatar
Junior Boarder

teitbite
Tue Feb 24, 2015 12:57 pm
Reply with quote
Report this post
Hi

For product page this code worked:

Code: Select all
         if ( $this->product->prices['basePrice'] != $this->product->prices['salesPrice']) {
                                    echo '<span class="price-crossed" style="text-decoration: line-through;">' . $this->currency->createPriceDiv ('basePrice', '', $this->product->prices) . "</span>";
                        }
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.