Looking for documentation? Take a look on our wiki

Main Menu

Attributes/Custom Fields Thread

Started by PRO, September 12, 2011, 15:02:49 PM

Previous topic - Next topic


I `m getting so close

-the dropdown is working,
-the child products images, prices, descriptions etc are working


-I need to remove the price from the Parent
-I need to remove the Parent from the dropdown
-I need to add the child attribute detail  (size) + child product price to the dropdown items so that you can tell at a glance what they are the way it is in vm 1.1

(having a list of

hand shovel
hand shovel
hand shovel

is not very user friendly)

If anyone knows how to do this is I would be ever so greatful


I think we are as close as they can expect us to get. at this point we are getting into core modification. I've spent most of the night chasing my tail trying to find where $this->product->customsChilds and echo $field->display is pulling its html from. The answer to all of this is in that
VM 2.0.4 Stable


I guess so - it`s just so disappointing that such an easy thing to do in vm 1.1 appears to be impossible in vm 2

the nuts & bolts of how the core works is beyond me, I do hope you figure it out, I know there are a LOT of people in the forums asking these same questions


Quote from: dsrpmedia on March 18, 2012, 05:24:19 AM
I guess so - it`s just so disappointing that such an easy thing to do in vm 1.1 appears to be impossible in vm 2

I agree.

And very disappointing nobody from the VM team give any reaction on the hole customfields discussion.
They don't take us seriously or they know about this problem, that it's not working in VM 2.0.3 and it's hard to get it fixed.


I know they have worked very hard to get it to the point where it is, unfortunately for me & probably a lot of people with similar requirements it is still not usuable
- I think perhaps they don`t realize how big a problem it is
- especially for shops which are already live with VM1.1 & need to migrate to the EXACT layout in VM2

If you cannot recreate your layout how do you migrate?


Read in the other thread how they react on this problem. Unbelievable.


seems like they are evading the issue
VM 2.0.4 Stable

Bruce Morgan

More like denial.  They seem reluctant to admit there is a problem until there is overwhelming evidence to the contrary.  I have been using the J/VM platform for almost 8 years and some of the most fundamental problems never get resolved.  Meanwhile the level of complexity has gone completely out of control, which would okay except the developers seem to presume that all shop owners are going to be versed in php coding.  What is going by the wayside is easy-to-use functionality "right out of the box".



One thing you can do (not that I would recommend it) is:

Product Status -> In Stock: 0 for the parent.
Then enable: Configuration -> Shopfront -> Core settings -> Displays 'Notify Me' instead of 'Add To Cart' button.
Then make it show something else instead of that 'notify me' button. I put a box the same size saying something like: "select size/available product".

Which is a "good enough" solution until a real fix comes.


that would be 'almost' good enough

1) the parent would still be showing up in the drop down
2) when a product actually is out of stock you would get the "select size/available product" notice instead of the notify.

almost as important - any thoughts on how we could display the child product attribute (size / colour, whatever) + price in the dropdown (the way it is in vm 1.1)
having a drop down with

hand shovel
hand shovel
hand shovel

is not very helpful, and I would love to avoid putting the child attribute/price in the product name if possible


Yes, your observation is correct. Well good enough in the sense that I have no other choice at the moment but to do that and come here everyday to check if a solution pops up.  :P

Insert DB rows to (almost SQL/CSV ) get PRODUCT CHILDS working (2.5+2.0.2)

Did you all see this? Seems like the only fix at the moment to get stockable products working. I'm not intimidated by MYSQL code but those instructions are a bit too much for me.... with a dummy explanation I would be willing to learn.



I `ve been so focused on trying to get the child products displaying properly I hadn `t had a chance to look at the inventory control

you are right  (joomla 2.5.2 / vm 2.0.3.E) the inventory control is not working in the front end

I have it set to
1) Display stock level (not working)
2) Displays 'Notify Me' instead of 'Add To Cart' button (not working)

I haven `t got to the point of actually putting something in a cart & checking out to see if the stock count itself is working - but the front-end display is not working at all - or is there something esle you have to do besides setting those 2 parameters on the configuraTION?


I have made some more progress.

I have successfully set up the children to display the Parent's Title. It involves creating a custom field type string, Custom field type parent,

1. Change the code in /templates/yourtemplate/html/com_virtuemart/productdetails/default.php to this below:

You are looking for <h1  id="product_name"><?php echo $this->product->product_name ?></h1>

<h1  id="product_name">
if (!empty(
$this->product->customfieldsSorted['Product'])) { 
$custom_title null;
       foreach (
$this->product->customfieldsSorted['Product'] as $field) {
if ($field->display) {
if ($field->custom_title != $custom_title) { 
echo $field->display;

else {
echo $this->product->product_name;

else {
echo $this->product->product_name;


2. Once that is done, check your product details page in your browser to make sure the page loads correctly. Choose a page with no custom fields.

3. Once that is done, create a custom field type Parent with these settings:

Cart Attribute="No"
Layout Position="ontop"

4. Next step, Create a custom field type String with these settings:

Title="anything you want" (it wont be displayed)
Cart Attribute="No"
Layout Position="Product" Case sensitive if you copied my script

5. Now.. whatever attributes you made to show in the add to cart area (ie. the dropdown), you must set the custom fields to have the same parent as the custom string we just created.

6. Once that is done, go to your parent product, remove all custom fields and add the custom field parent we just created.

7. Type in the name of the parent product and save. All children of this product will get the custom string to show up as the product title.

This script/setup will inject That product name as the title of all children product pages and if there are no custom fields for this product, the original product title will show.

I hope this was easy to understand. if you follow precicely, it will work as you can see here ->

Any questions you can contact me, but just to let you know, I am very busy and it may be a while for me to get back to you during a work week. My day job actually is designing fire protection sprinkler systems. web design is just a weekend hobby for me.... :)

VM 2.0.4 Stable


Having gone through this thread is it safe to assume I'll have to make some core mods and spend a good amount of time to get basic attributes in dropdowns working?

If that's the case I might have no other choice than to use another cart.  I can't spend time working on what should be a basic, easy to use feature that existed as such in VM 1.1.


What about this :

Thinking out of the box

I don't know if it works