VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Products, Prices, Tax and Categories VM 1.1 => Topic started by: esarraille on March 25, 2010, 00:44:44 am

Title: Availability not displaying on product w/ children
Post by: esarraille on March 25, 2010, 00:44:44 am
It is probably by design that a Product with items/child associated does not display the product "Availability" (Usually Ships in) status since the multiple items may have different availability dates.

Is there a way to either override this and have the "Availability" displayed on the Product pages even with item/child associated?

Title: Re: Availability not displaying on product w/ children
Post by: esarraille on April 23, 2010, 20:28:47 pm
Still haven't found a solution to this looked in classes and html to see if something was triggering this behavior but found nothing.  There was a section in classes that was connecting is_parent and availability but didn't appear to effect the display.
Title: Re: Availability not displaying on product w/ children
Post by: rb on April 27, 2010, 00:32:58 am
Yes, this can be done, but it requires changes to some different files including a core VirtueMart class.  You'll have to change the function "get_availability_data" in the class "ps_product" which is in the file "ps_product.php" to ignore if it's a parent or not.  Then you'll have to change "availability.tpl.php" to determine if it is a parent, and then to not show the quantity in stock (since the quantity for the parent is meaningless).