VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: buzzbored on June 06, 2016, 21:02:36 PM

Title: [solved] Call for Price link to contact page
Post by: buzzbored on June 06, 2016, 21:02:36 PM
Hello all, when I don't enter a price I get a box for 'call for price' this links to a login page. I would like it to link to a contact page instead . how to do?
Title: Re: Call for Price link to contact page
Post by: GJC Web Design on June 06, 2016, 21:08:00 PM
over ride the sublayouts\prices.php link in  \templates\xxxxx\html\com_virtuemart\sublayouts\prices.php
Title: Re: Call for Price link to contact page
Post by: buzzbored on June 07, 2016, 19:08:23 PM
I don't understand . Override to what, what code to change. I'm new to virtuemart sorry if this is simple.
Title: Re: Call for Price link to contact page
Post by: GJC Web Design on June 07, 2016, 19:16:32 PM
have u opened the file?

there is a link in it.. change to what ever u want
Title: Re: Call for Price link to contact page
Post by: buzzbored on June 07, 2016, 19:54:54 PM
This area :
<div class="product-price" id="productPrice<?php echo $product->virtuemart_product_id ?>">
   <?php
   if (!empty($product->prices['salesPrice'])) {
      //echo '<div class="vm-cart-price">' . vmText::_ ('COM_VIRTUEMART_CART_PRICE') . '</div>';
   }

   if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and isset($product->images[0]) and !$product->images[0]->file_is_downloadable) {
      $askquestion_url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id . '&tmpl=component', FALSE);
      ?>
      <a class="ask-a-question bold" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
      <?php
   } else {

What is $askquestion_url? when I click on call for price I get a login screen.
Title: Re: Call for Price link to contact page
Post by: GJC Web Design on June 07, 2016, 20:41:33 PM
make

$askquestion_url = 'your loink to your contact page';  and change the class so it doesn't pop as a modal
Title: Re: Call for Price link to contact page
Post by: Ghost on June 08, 2016, 08:41:54 AM
It links to login page  because "Allow non logged-in to send a recommendation or ask a question" option is disabled. You can enable it so that visitors can ask a question through VM form without having to login.
Title: Re: Call for Price link to contact page
Post by: GJC Web Design on June 08, 2016, 12:22:58 PM
QuoteI would like it to link to a contact page instead

this is what I was answering
Title: Re: Call for Price link to contact page
Post by: buzzbored on June 08, 2016, 16:49:32 PM
Thanks GJC i'm learning more about how things work thanks to this. AND thanks Ghost, this option will work just fine. I was hoping that something simple could be done. i'm using this currently as a catalog and have no need to make people sign up.