Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • banepa Friend
    #180290

    I 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 Friend
    #465594

    Hi,

    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


    1. 8-28-2012-4-15-53-PM
Viewing 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