Author Topic: "call for price" link removal - Different request  (Read 30061 times)

djreason

  • Jr. Member
  • **
  • Posts: 125
    • Game Room and Man Cave Supplies
"call for price" link removal - Different request
« on: January 13, 2010, 01:53:23 am »
I know there are a ton of questions out there concerning how to totally remove the link from the flypage if you do not wish to display the "call for pricing" option on those products that do not have pricing defined. 

However, I still want this message to appear.  What i DONT want is for it to be a clickable link to a separate email form. All I want is the text "Call for Pricing". 

How/Where can I remove the functionality of this part of my flypage so that it looks like static text and not a clickable link?

I am using Joomla 1.5.14 and VM 1.1.3 with the default theme.

rojones31

  • Jr. Member
  • **
  • Posts: 56
  • VirtueMart Version: 3.0.6.2
Re: "call for price" link removal - Different request
« Reply #1 on: January 14, 2010, 16:08:29 pm »
I'm having the same problem. Can anyone point me in right direction. I want to get rid/disable the "Call for pricing" link shown in the cart.  Please help!

LeopardMan

  • Beginner
  • *
  • Posts: 17
Re: "call for price" link removal - Different request
« Reply #2 on: February 01, 2010, 09:35:58 am »
Yep - me too, having the same problem.
It seems most threads on this topic date back to 2006 and 2007, as do the answers.
But the solutions given are not to be found in the latest version of VM.

Can anybody help out?

In which file can I find the "mailto" link that is under "Call for pricing"?
I have changed the "Call for pricing" in english.php in the language directory, but the link to "mailto" still exists...

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: "call for price" link removal - Different request
« Reply #3 on: February 02, 2010, 22:51:02 pm »
Here's a quick and easy fix that is template based as to not hack your core. Go to your category and product details templates:
/components/com_virtuemart/themes/vmj_genx/templates/browse
/components/com_virtuemart/themes/vmj_genx/templates/product_details

and where it normally calls out for "<?php echo $product_price ?>" you can  check for the "Call for Pricing" string, and if that exists, then do something other than "<?php echo $product_price ?>".... like this:


<?php if (stristr( $product_price, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') )) { ?>

PUT WHATEVER YOU WANT HERE WHEN NO PRICING. IF NOTHING, THEN REMOVE THIS LINE.

<? } else { ?>

        <?php echo $product_price ?>
        <?php echo $addtocart ?>            

<?php } ?>


In this example, my product price AND addtocart are not called out since there is not point in calling out addtocart when you cant addtocart anyways.

LeopardMan

  • Beginner
  • *
  • Posts: 17
Re: "call for price" link removal - Different request
« Reply #4 on: February 05, 2010, 17:55:52 pm »
Could you tell me what my options are if the sentence
<?php if (stristr( $product_price, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') )) { ?>
does not appear in any of the files in those two templates?

What are my options of hacking into the core, to get this string out? It now points to a "mailto" link, which I don't want.


PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10319
  • VirtueMart Version: 3+
Re: "call for price" link removal - Different request
« Reply #5 on: February 05, 2010, 18:47:55 pm »
templates/common/price.tpl

<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
   
   $link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&amp;product_id='.$product_id.'&amp;subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") );
   echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') );

}
?>


You are going to have to change the code in bold to whatever you want it to say
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: "call for price" link removal - Different request
« Reply #6 on: February 05, 2010, 19:14:52 pm »
<?php if (stristr( $product_price, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') )) { ?>

will NOT appear in your template... that is what you need to add! Add the whole statement around <?php echo $product_price ?> and if you wish include <?php echo $addtocart ?>.
     

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10319
  • VirtueMart Version: 3+
Re: "call for price" link removal - Different request
« Reply #7 on: February 05, 2010, 20:32:35 pm »
templates/common/price.tpl

<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
   
   $link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&amp;product_id='.$product_id.'&amp;subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") );
   echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') );

}
?>


You are going to have to change the code in bold to whatever you want it to say



Tried it

Changed it to this, and it worked


<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
   
echo "Please Call";
}
?>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

GenX1980

  • Beginner
  • *
  • Posts: 1
Re: "call for price" link removal - Different request
« Reply #8 on: April 07, 2010, 22:58:05 pm »
I tried this and it did not work.  I am using Joomla 1.15 and Virtue mart version 1.1.4 and need to get rid of the link for call for pricing and need to replace it with some plain text with no link.  I also need to enlarge the thumbnail size to be a little larger for products..

Any suggestions?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: "call for price" link removal - Different request
« Reply #9 on: April 07, 2010, 23:12:32 pm »
There are TWO solutions in this post, did you try them both?
Ia m on 1.5.15 and VM 1.1.4, and I know I tested my solution.

androydtech

  • Beginner
  • *
  • Posts: 1
  • Valentina de Boutique l'ÈrotiqueUK
    • Boutique L'Èrotique Lingerie UK
Re: "call for price" link removal - Different request
« Reply #10 on: April 15, 2010, 00:00:47 am »
templates/common/price.tpl

<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
   
   $link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&amp;product_id='.$product_id.'&amp;subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") );
   echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') );

}
?>


You are going to have to change the code in bold to whatever you want it to say



Tried it

Changed it to this, and it worked


<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
   
echo "Please Call";
}
?>


Good Idea, but if you want to leave a simple text (eg. Reserved price, register)


<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
   
   echo $VM_LANG->_('PHPSHOP_PRODUCT_CALL') ;
   
}
?>


Remember modify in administrator-->components-->com_virtuemart-->languages-->common

chose the language.php and find "PHPSHOP_PRODUCT_CALL" for to change a text.


kemiga

  • Beginner
  • *
  • Posts: 4
Re: "call for price" link removal - Different request
« Reply #11 on: June 04, 2010, 04:17:43 am »
Hi Forrest

I am looking for some "show price url range" (product_price) between 2 values ex.
link example (in the left side): http://www.wine.com.br/

00-40
40-80
80-120 etc

I saw your posts related close to what I was looking for.
Do you have an idea of how to solve this?

I'm using Joomla 1.5.17 and VM 1.1.4

By the way: Nice things you have done so far!

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: "call for price" link removal - Different request
« Reply #12 on: June 04, 2010, 07:12:36 am »
Not sure I fully understand you. It looks like you have created categories to accomplish price range assignment. What else are you wanting?

kemiga

  • Beginner
  • *
  • Posts: 4
Re: "call for price" link removal - Different request
« Reply #13 on: June 04, 2010, 14:28:29 pm »
Sorry for my description. Try to write with more precision.

wine.com.br is not my site, but a reference to what I want in another site.
I want to have the same option as in wine.com.br and to work with virtuemart 1.1.4
Like you said, I could actually do it with categories, but I don't think that is the most optimal solution.

Do you think that it would be possible in joomla/ virtuemart?

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: "call for price" link removal - Different request
« Reply #14 on: June 05, 2010, 10:35:37 am »
Yes, use Product Types... and look for a navigation for products types on this forum... I'm pretty sure there is one.

Otherwise, no, categories is your next best way beyond creating a custom search function.