VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Attributes, Child Products VM 1.1 => Topic started by: pcjunkie on April 30, 2008, 06:20:41 am

Title: Parent with Child. (No really)
Post by: pcjunkie on April 30, 2008, 06:20:41 am
I would like to know of any possible way to display the parent in a browse page without the price, or, not having a price at all.

In the data base all parents have a price, if not they display, not priced.
When peeps browse the category they see the price regardless children or not. What I would like to know is there a way to...

1 eliminate the price requirement of a parent product and use that as a category display only. This would make editing in CSV / spread sheets much less confusing.  (not for me but my employer)

2 attach a switch to remove the price and display something else like read more..

3 Allow the switch to insert "from" before the price if children are present.

Title: Re: Parent with Child. (No really)
Post by: ali on May 06, 2008, 05:12:44 am
i need this too!
Title: Re: Parent with Child. (No really)
Post by: RedLight Traitor on May 30, 2008, 12:25:00 pm
I thought you could do this easily by just editing the browse page file. Have you tried that? Just take out the php code that shows the price.
Title: Re: Parent with Child. (No really)
Post by: revive on January 30, 2009, 17:40:04 pm
@pcjunkie - RedLight Traitor is correct.. this is a fairly simple mod.

First, go to: components/com_virtuemart/themes/WHAT-EVER-THEME-YOU'RE-USING/templates/browse/

and open the browse page you are using in a text editor - the same browse page you set in the admin (you have selected one in the admin either under the main config or for a specific category) - eg. we are using the browse_3.php for one of our clients.

find this PIECE of code:
Code: [Select]
<?php echo $product_price ?>

change to this:
Code: [Select]
<!-- commented out the line below to remove pricing from the browse page -->
<!-- <?php echo $product_price ?> -->

Notice, this will simple comment out the price.. it does not change the 'logic' that makes the system function and therefore should be reliable.

Hope this helps ;)