News:

Looking for documentation? Take a look on our wiki

Main Menu

Duplicate Custom Fields in Product Children

Started by hazael, July 13, 2018, 17:18:35 PM

Previous topic - Next topic

hazael

How to hide duplicates of custom fields from parent products in child products?

Jörgen

Click on the d-box (disable) for the custom field and it will be hidden in the child.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

hazael

#2
I have over 1k of such products. :-/ How to do it massively for all parent products?

Jörgen

Why haven´t You noticed it until now ? Why creating 1000 products with incorrect data ?

You could make a dbase query to set this right
You could probably use a tool from Studio42 to batch process this, not quite sure if it works with this peticular issue.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

Jorgen, i dont think that my tool VM be pro can fix this, but should the field not override the parent field by default ?

Jörgen

Yes, I suspected it might not fix this.

You could be right about the override, but I am not sure. At least my tests show the same result as hazaels. But honestly I do not see the reason to add an already inherited custom field. There is a reason Why it should be inherited in the first place, isn´t there.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

Jorgen the setting is perhaps not right.
But Virtuemart should not display the same customfield in child when the field exist by default.
I have do some test and the behavior is not always the same.
In this test page http://pro.st42.fr/fr/android/zte-nubia-z17.html
all customfields are set in parent and child.
I have one parent customfield in the back-end displayed before the child customfields on edit product.
This field is in the sample "technology" and is only displayed 1 time in front.
But the other parent field are displayed after in the edit form and are displayed 2 time in front.
So Virtuemart have a bug , because the behavioer should not depend the order in the form
I have set the "tags" customfield to disable (d checkbox) and its only displayed 1 time.

So the question is, should VM display or not the parent customfield by default if this exist in the parent ?
This is very important to know, because when you import customfields for 10000 product, you have to verify(or not), if this need to be imported, or if this need to have parent "d" checkbox to true.
The logic for all Virtuemart fields is to not get parent fields when child have same field set, so for me the behavior is bad.



hazael

#7
QuoteWhy haven´t You noticed it until now ? Why creating 1000 products with incorrect data ?

I migrated all products from Prestashop to Virtuemart.
Each product had similar parameters but often different values.
Some products had descriptions, price and photos were the same and I decided to connect them to the parent product

Jörgen

This had been good to know. Patrick thinks there might be some inconsistancy in the behaviour. I really don't know what is right any more.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

I have to add this feature in Vm Be Pro. I have done some tests and this can be painful when you have many parent products to disable or override.

GJC Web Design

QuoteI have done some tests and this can be painful when you have many parent products to disable or override.

Having had a client recently who configured 100's of products to a parent pattern ( should have used different patterns) and then had this same problem can agree it is not ideal when u want to remove/change them.
Also plagued with be unable to delete duplicate custom fields and have to leave them just disabled.. haven't looked into this
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

hazael

Is there any feature that will hide all Duplicate Custom Fields from parent product in product children?

GJC Web Design

if u know the index of the ones that are correct u can do it in the template display loop

but u have to be sure that the index is consistant ( they are returned as a numeric array of the layout position )
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

hazael

#13
I do not know how to do this :(
i have two positions (product and product list):
Quoteecho shopFunctionsF::renderVmSubLayout('customfields',array ('product'=>$product,'position'=>'front-param'));
Quoteecho shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));

How to separate it and hide duplicates or parrent products?

GJC Web Design

in the sublayout I guess in the loop look for dupes ...but how do u know which is the correct one?
but if u can't code then u need to hire a coder
or manually remove the dupes in the DB etc..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation