Author Topic: [SOLVED]Hide price for certain products  (Read 3678 times)

krakoukass

  • Beginner
  • *
  • Posts: 38
[SOLVED]Hide price for certain products
« on: August 10, 2010, 00:10:09 am »
I'm sorry because I posted this answer in an other thread but I think it wasn't in the good.
Sorry also for my english, I'm French.

I would like to hide prices of certain products for not registered visitors, not for all products. I tried with price = 0 but it's not good, the price 0 is displayed when the visitor is not registered. I tried also with blank but it's the same : O is displayed.
I found this post : http://forum.virtuemart.net/index.php?topic=65510.msg219904 but I think it's for the case where all prices are hidden.
I'm working with Virtuemart 1.1.4 and Joomla 1.5.18.

Can you help me please ?

Than you very much.

krakoukass

  • Beginner
  • *
  • Posts: 38
Re: Hide price for certain products
« Reply #1 on: August 10, 2010, 18:00:16 pm »
Hello, who can help me, please ?
I tried with <?php if ($product_price !== "€0,00") {echo $product_price}  ?> or <?php if ($product_price !== "€0,00") {echo $product_price} else {echo "only for registered"}  ?> in flypage.tpl
Nothing work, it displays only the content of echo. As if the condition isn't there. Why ???

I hope someone can says me where is the problem.

Thank you

krakoukass

  • Beginner
  • *
  • Posts: 38
Re: Hide price for certain products
« Reply #2 on: August 12, 2010, 15:22:25 pm »
please, nobody can help me ?

krakoukass

  • Beginner
  • *
  • Posts: 38
Re: Hide price for certain products
« Reply #3 on: August 13, 2010, 01:41:04 am »
Hi everybody ! I tried as here http://forum.virtuemart.net/index.php?topic=65510.msg219904 and I replaced <?php echo $product_price ?> by    <?php if (stristr( $product_price, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') )) { ?>   
      <? } else { ?>

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

<?php }?>
but no price appears (0 or other)
How can I hide price 0 and display other prices for not logged visitors ?

Please, help me.

thank you very much !

krakoukass

  • Beginner
  • *
  • Posts: 38
Re: Hide price for certain products
« Reply #4 on: August 13, 2010, 11:23:08 am »
Hi ! I found anything : if the product wich price is 0 for unregistered visitor doesn't has other price for other shopper group, "please call" displayed. But if this product has other prices for other group, 0,00 displayed. Then I tried with shopper_group_id in the condition but that don't work. Why ?

This the code in browse_1.php :
<?php if (
     $product_price =="0,00" AND $shopper_group_id ==5
     )
     {
     echo "Please call";
     }
      else
      {
      echo $product_price;
      } ?>
I tried with "€0,00" "0" ... but nothing working.
If product_price !=0 display is Please call. If product_price ==0 all prices displayed.

I really need help !
Thanks !!

krakoukass

  • Beginner
  • *
  • Posts: 38
Re: Hide price for certain products
« Reply #5 on: August 14, 2010, 12:59:04 pm »
houhou nobody can help me ? I think that don't works because $shopper_group_id isn't define then I look for it but I don't understand very well the manual for developers. Am I the only user of Virtuemart wich need this function ??

Thanks for your help !

krakoukass

  • Beginner
  • *
  • Posts: 38
[SOLVED]: Hide price for certain products
« Reply #6 on: August 21, 2010, 18:09:29 pm »
Hi ! I'm always looking for a soluce to hide price for certain product if price = 0 only for unregistered visitor. It's ok when there is no other price for this product. But it's dont working if the product has more price. Then, 0 displays.
I think it's necessary to put "if group_shopper_id" but I don't find how.
I hope you understand my question because I'm french.

Thank you

krakoukass

  • Beginner
  • *
  • Posts: 38
Re: Hide price for certain products
« Reply #7 on: August 27, 2010, 12:11:35 pm »

munishsethi777

  • Jr. Member
  • **
  • Posts: 52
  • Joomla VirtueMarter
Re: [SOLVED]Hide price for certain products
« Reply #8 on: August 30, 2010, 09:29:42 am »
Sorry but i really laughed looking at your Post.. You ask questions and you reply yourself.. I know virtuemart support is quite poor but yes it teaches us patience and ability to fight and find solutions ourselves..
It happens with me even, i shout for solutions, i sit down and study myself..

keep it up..