price in category view

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
Tue Apr 14, 2015 11:35 am
Reply with quote
Report this post
How can I enable to show price in category view ?

In other templates (like store box) it is by default, and here on your demo template it is without prices also.

P.S. I found on the forum where to change price (base and etc), but not where to turn it on in the beginning.

Thanks.
User avatar
Gold Boarder

teitbite
Wed Apr 15, 2015 2:41 pm
Reply with quote
Report this post
Hi

I edited /html/com_virtuemart/catrgory/default.php and I found this code:

Code: Select all
               <?php
               /* REMOVE THE COMMENT AND PHP TAGS IF YOU NEED TO DISPLAY PRICES ON THE CATEGORY LISTING
               <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 ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
                  } ?>
               </div>
               */
               ?>


so I did as written there (REMOVE THE COMMENT AND PHP TAGS IF YOU NEED TO DISPLAY PRICES ON THE CATEGORY LISTING) :)
User avatar
Moderator

GK User
Sun May 03, 2015 4:53 pm
Reply with quote
Report this post
Hello,

I am attempting to do the same for Shop & Buy template. I have found the following code in the same file:

Code: Select all
<h3 class="catProductTitle"><?php echo JHTML::link($product->link, $product->product_name); ?></h3>
               
               <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>
               
               <?php if ( VmConfig::get ('display_stock', 1)) : ?>
               <div class="stockLavel"> <span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip ?>"></span> <span class="stock-level"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span> </div>
               <?php endif; ?>


Can someone please let me know what I need to do to display the price?

Thanks,

Prit
User avatar
Gold Boarder

GK User
Thu May 07, 2015 1:09 pm
Reply with quote
Report this post
Hello,

Can anyone help with the above please? I've added the code that I see in my file, but I am not too sure what I need to delete?

Thanks in advance,

Prit
User avatar
Gold Boarder

teitbite
Sun May 10, 2015 12:20 pm
Reply with quote
Report this post
Hi

Price is not commented out in Shop&Buy template, so please check if price is not disabled in VM configuration. Also check if tax is set properly. In some case lack of tax is not showing prices at all.
User avatar
Moderator


cron