-
AuthorPosts
-
banepa Friend
banepa
- Join date:
- September 2011
- Posts:
- 109
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 23
- Thanked:
- 2 times in 1 posts
August 27, 2012 at 9:12 pm #180290I have Joomla 2.5.6 and Virtuemart
A link on the main menu points to a particular Category Page (Category Layout Virtuemart menu).
Currently it displays a grid with
a. Image
b. Price
c. Product Title
d. Button that reads [Product Details]I need to do the following:
1. I need to remove #b and #d.
2. Link the Image to the product details page.
Currently clicking the image just pops the enlarged image.Questions:
+++++++++++++++++++++++++++++
1. What specific php page should I change?
I tried changing
public_html/components/com_virtuemart/views/category/tmpl/default.php
But nothing seems to change.
Am I changing the correct page?2. Is there some cache that is disabling the changes from being seen?
If so how do I remove cache for Virtuemart?Thanks
MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
August 28, 2012 at 9:17 am #465594Hi,
Open file : “templates/ja_vintas/html/com_virtuemart/category/default.php”
1. Remove “Price” : find and remove code from line 258 to 281
[PHP]
<div class=”product-price marginbottom12″ id=”productPrice<?php echo $product->virtuemart_product_id ?>”>
<?php
if ($this->show_prices == ‘1’) {
if( $product->product_unit && VmConfig::get(‘vm_price_show_packaging_pricelabel’)) {
echo “<strong>”. JText::_(‘COM_VIRTUEMART_CART_PRICE_PER_UNIT’).’ (‘.$product->product_unit.”):</strong>”;
}
if(empty($product->prices) and VmConfig::get(‘askprice’,1) and empty($product->images[0]->file_is_downloadable) ){
echo JText::_(‘COM_VIRTUEMART_PRODUCT_ASKPRICE’);
}
//todo add config settings
if( $this->showBasePrice){
echo $this->currency->createPriceDiv(‘basePrice’,’COM_VIRTUEMART_PRODUCT_BASEPRICE’,$product->prices);
echo $this->currency->createPriceDiv(‘basePriceVariant’,’COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT’,$product->prices);
}
//echo $this->currency->createPriceDiv(‘variantModification’,’COM_VIRTUEMART_PRODUCT_VARIANT_MOD’,$product->prices);
//echo $this->currency->createPriceDiv(‘basePriceWithTax’,’COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX’,$product->prices);
//echo $this->currency->createPriceDiv(‘discountedPriceWithoutTax’,’COM_VIRTUEMART_PRODUCT_DISCOUNTED_PRICE’,$product->prices);
//echo $this->currency->createPriceDiv(‘salesPriceWithDiscount’,’COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT’,$product->prices);
echo $this->currency->createPriceDiv(‘salesPrice’,”,$product->prices);
//echo $this->currency->createPriceDiv(‘priceWithoutTax’,’COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX’,$product->prices);
//echo $this->currency->createPriceDiv(‘discountAmount’,’COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT’,$product->prices);
//echo $this->currency->createPriceDiv(‘taxAmount’,’COM_VIRTUEMART_PRODUCT_TAX_AMOUNT’,$product->prices);
} ?>
</div>
[/PHP]2. Remove “Button that reads [Product Details]”: find and remove code from line 293 to 297:
[PHP]
<p>
<?php // Product Details Button
echo JHTML::link($product->link, JText::_(‘COM_VIRTUEMART_PRODUCT_DETAILS’), array(‘title’ => $product->product_name,’class’ => ‘product-details’));
?>
</p>
[/PHP]3. Link the Image to the product details page :
find code :
[PHP]
echo $product->images[0]->displayMediaThumb(‘class=”browseProductImage” border=”0″ title=”‘.$product->product_name.'” ‘,true,’class=”modal”‘);
[/PHP]and change it to same :
[PHP]
<a href=”<?php // Product Details Button
echo JHTML::link($product->link, JText::_(‘COM_VIRTUEMART_PRODUCT_DETAILS’), array(‘title’ => $product->product_name,’class’ => ‘product-details’));
?>” ><img src=”<?php echo $product->images[0]->file_url_thumb; />”</a>
[/PHP]with : $product->images[0]->file_url_thumb : thumbnail of images
$product->images[0]->file_url : full images.4. If you want remove cache for component virtuemart, go to template manager -> add to params “Cache Exclude” : component=com_virtuemart
AuthorPostsViewing 2 posts - 1 through 2 (of 2 total)This topic contains 2 replies, has 2 voices, and was last updated by MoonSailor 12 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Changing Category Layout Page
Viewing 2 posts - 1 through 2 (of 2 total)