Virtuemart Category View Prices

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
Wed Jun 05, 2013 6:42 pm
Reply with quote
Report this post
Hi,

Noob here again but I want the category view of Virtumart to display the override (sale price of an item)instead of the full price.

Im a total amateur so any help would be most welcome.

Thanks,
Fionn
User avatar
Senior Boarder

teitbite
Thu Jun 06, 2013 6:25 pm
Reply with quote
Report this post
Hi

Please just remind me ftp access by PM and I'll see if it's possible and make it.
User avatar
Moderator

GK User
Thu Jun 06, 2013 7:41 pm
Reply with quote
Report this post
Email sent with details again,

Thanks once more for the help!
User avatar
Senior Boarder

teitbite
Fri Jun 07, 2013 11:35 am
Reply with quote
Report this post
Hi

I've checked the code and looks like this should be possible only with VM configuration. Code looks like that:

Code: Select all
               <div class="catProductPrice" id="productPrice<?php echo $product->virtuemart_product_id ?>">
               <?php
                  if ($this->show_prices == '1') {
                     if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {
                        echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
                     }                  
                     echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
                     echo $this->currency->createPriceDiv('taxAmount','TPL_GK_LANG_VM_INC_TAX', $product->prices);
                  } ?>
               </div>


so the most important to accomplish the task is to allow showing prices ("show_prices"). Without this option enabled prices are not being picked up from database so I'm not able to show it even if I will try to force it to.
User avatar
Moderator

GK User
Fri Jun 07, 2013 7:02 pm
Reply with quote
Report this post
Thanks,

Show Prices is enabled in the Virtumart configuration... the reason there is no prices at the moment is I have deleted them all temporarily.

So I can see the setting that tells it to show basePriceWithTax, I want to show the salesprice if one exists otherwise baseprice, is this possible?

PS thanks for all this help!
User avatar
Senior Boarder

teitbite
Sun Jun 09, 2013 6:32 pm
Reply with quote
Report this post
Hi

I have replaced prices code, so now a salePrice should be visible instead of a priceWithTax.

Code: Select all
//echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
echo $this->currency->createPriceDiv('salesPrice', '', $product->prices);
User avatar
Moderator

GK User
Sun Jun 09, 2013 9:38 pm
Reply with quote
Report this post
You sir are a legend, thank you so much for the help!
User avatar
Senior Boarder

GK User
Tue Jul 23, 2013 8:20 pm
Reply with quote
Report this post
teitbite and if i want 2 prices in category how i can get class for default price with text decoration line-through?
User avatar
Fresh Boarder

teitbite
Wed Jul 24, 2013 5:23 am
Reply with quote
Report this post
Hi

@mintonxbz that's not so simple that I can guess. Please send me an access to ftp and an url to the example page I'll be able to see products where You want to make this modification.
User avatar
Moderator

GK User
Thu Jul 25, 2013 10:26 pm
Reply with quote
Report this post
teitbite wrote:Hi

@mintonxbz that's not so simple that I can guess. Please send me an access to ftp and an url to the example page I'll be able to see products where You want to make this modification.

thx for fast answer. I think it's very simple, and i made it with css
Code: Select all
.catProductPrice span.PricesalesPrice {
border-top: 2px #ab0000 solid;
padding: 12px;

now i try to hide sale price of all items which have same prices and if you can help me I will be very happy!
User avatar
Fresh Boarder

teitbite
Fri Jul 26, 2013 1:21 am
Reply with quote
Report this post
Hi

Yes this was simple. I thought You do not have 2 prices and first I will have to add it :) Sorry for misunderstanding.
User avatar
Moderator

GK User
Fri Apr 25, 2014 5:29 pm
Reply with quote
Report this post
teitbite wrote:Hi

I have replaced prices code, so now a salePrice should be visible instead of a priceWithTax.

Code: Select all
//echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
echo $this->currency->createPriceDiv('salesPrice', '', $product->prices);


Where did you find this code so I can change it on my site? I found it....its in template/html/com_virtuemart/category/default.php
User avatar
Gold Boarder

teitbite
Sat Apr 26, 2014 10:01 pm
Reply with quote
Report this post
Hi

Yes, that's the exact file we have been discussing. Please show me where do You need to change this price.
User avatar
Moderator


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