VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: markmilo1115 on May 17, 2012, 02:57:57 AM

Title: Ask a question about this product box
Post by: markmilo1115 on May 17, 2012, 02:57:57 AM
I'm interested in relocating the "Ask a question about this product" button.  I've looked through the various PHP document in the views folder, but found myself at a loss.  Not very proficient at coding PHP.

Does anyone have any experience or suggestion on how relocate this button to various locations on the product details page?

Attached is an image illustrating my goal.

Thanks.

[attachment cleanup by admin]
Title: Re: Ask a question about this product box
Post by: Murkur on May 21, 2012, 23:16:23 PM
You need to go in file "default.php" in "components\com_virtuemart\views\productdetails\tmpl\" and find this text "// Ask a question about this product".
In my file it`s about 214-230 lines:

<?php
// Ask a question about this product
if (VmConfig::get('ask_question'1) == '1') {
    
?>

    <div class="ask-a-question">
        <a class="ask-a-question" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
        <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>-->
    </div>
<?php }
?>


<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers'1) && !empty($this->product->virtuemart_manufacturer_id)) {
    echo $this->loadTemplate('manufacturer');
}
?>



So, you can move this code to your place.
Title: Re: Ask a question about this product box
Post by: markmilo1115 on May 22, 2012, 04:30:40 AM
Thank you very much, that did the trick.