### Author Topic: GENERAL QUESTION: Weight of custom fields  (Read 5502 times)

#### servlet

• Jr. Member
• Posts: 348
• Business optimization
• VirtueMart Version: 3.2.2
##### GENERAL QUESTION: Weight of custom fields
« on: January 26, 2017, 16:31:02 pm »
I found there is no option to calculate weight of selected custom fields of product to calculate correct shipping price.

How to calculate weight of this product:

Material: Canvas, Art Textile (1 kg, 1.5 kg)
Subframe: Without subframe, With subframe (0 kg, 1 kg)
Frame: Simple slim frame, Medium gold frame, Large art frame. (1 kg, 2 kg, 3 kg)

How VM calculate weight for print reproduction or something similar where there is weight for every custom field.

If you have selection as: Canvas + Without subframe + Simple slim frame = 1 + 0 + 1 = 2 kg.
If you have selection as: Art Textile + With subframe + Large art frame = 1.5 + 1 + 3 = 5.5 kg

I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

#### Studio 42

• Contributing Developer
• Sr. Member
• Posts: 3905
• Joomla & Virtuemart developper
• VirtueMart Version: 2.6 & 3
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #1 on: January 27, 2017, 02:40:59 am »
you need to write own plugin

#### servlet

• Jr. Member
• Posts: 348
• Business optimization
• VirtueMart Version: 3.2.2
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #2 on: January 27, 2017, 07:34:20 am »
Plugin for custom fields or other?
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

#### Studio 42

• Contributing Developer
• Sr. Member
• Posts: 3905
• Joomla & Virtuemart developper
• VirtueMart Version: 2.6 & 3
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #3 on: January 27, 2017, 13:18:16 pm »
A customfield plugin.
You have a plugin in the forum that can change the weight per option. But i cannot find it

#### servlet

• Jr. Member
• Posts: 348
• Business optimization
• VirtueMart Version: 3.2.2
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #4 on: January 29, 2017, 18:08:29 pm »
This is a good news, but how can I find it?
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

#### lindapowers

• Full Member
• Posts: 1335
• If you're going through hell, keep going.
• Skype Name: manu.gonzalez91
• VirtueMart Version: Latest avi
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #5 on: January 29, 2017, 20:36:59 pm »
The only one I know that modifies weight is this one https://forum.virtuemart.net/index.php?topic=127362.0 but that one doesn't work as you or me needed.

From your example what you require is basicly the "String type" custom field with weight option per variant.
This could add options like: 1 kg 2 kg 3 kg without having to create child or multivariants and is so much simple to add string custom fields than childs or multivariants.

If the product is the same is quite nonsense having to create multivariants or childs just for weight variants.

Some could argue  that each user could request any other field there added and is true however the weight is something very common to be applied to shipping costs and there are many weight dependent shipments in all countries.

For now what we use is child products since we have no other option, luckily we don't have that many products which are the same but with different weight variants, even in some products we ended up adding only one variant as main product due to this limitation.

#### servlet

• Jr. Member
• Posts: 348
• Business optimization
• VirtueMart Version: 3.2.2
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #6 on: January 29, 2017, 21:23:26 pm »
Thank you for info @lindapowers
I know about this extension. In this topic ones of latest comments are mine...

As you, I am using one weight for hole product. I am using heaviest variant of product, but it is no correct for the customer. He will pay more.

I hate multivariants or child product.

I have more than 10 000 variants per 1 product via custom fields selection. If I have to build 10 000 child products for every head product I will die before do this. From other side database will be extremely heavy.

I am just kidding what will cost to be builded such custom filed plugin with weight calculation
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

#### lindapowers

• Full Member
• Posts: 1335
• If you're going through hell, keep going.
• Skype Name: manu.gonzalez91
• VirtueMart Version: Latest avi
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #7 on: January 29, 2017, 23:03:36 pm »

As you, I am using one weight for hole product. I am using heaviest variant of product, but it is no correct for the customer. He will pay more.

Ah my friend I understand perfectly, we did that also some time ago but it is indeed not fair for the customer and even for you if you export the calculated weight it will show incorrect values.

In our case it was only a few products so we could live without them or were added as childs but for your case you really need that function indeed, ask the VM team or Patrick (Studio 42). Pretty sure this can be done to satisfy your needs, is just a matter of variants with the weight value added or creating 10 000 childs which doesn't seem very nice solution.

#### Studio 42

• Contributing Developer
• Sr. Member
• Posts: 3905
• Joomla & Virtuemart developper
• VirtueMart Version: 2.6 & 3
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #8 on: January 30, 2017, 01:30:39 am »
Thanks Manu, it was the plugin i searched for
You need to explain, the problem for your variant and why this plugin do not work for you?
For a customer that sold Home portal, i wrote a price table(2 options height and width), this is generic for all products using this matrix, so you don't have to manage the prices variants for each products.
So if you have always the same options for many product, it's possible to use generic options for all so in your database you have only 1 customfield declared per products and the whole datas are in only one customfield.
If you need 4 or 5 different generic datas, you can of course declare the customfield 4 or 5 times or more.
So for my customer he had 6 variants  generic price table customfield for only 86 products and have only this to manage for all portals else he had to add more then  7400 multivariant using childs.
And i have do same for the colors, because he use always 6 same colors for all

#### Milbo

• Virtuemart Projectleader
• Administrator
• Super Hero
• Posts: 9853
• VM3.2 Cached and Optimized
• VirtueMart Version: VirtueMart 3 on joomla 3
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #9 on: January 30, 2017, 10:19:37 am »
lol, why the heck have you so much problems with childs? There is no performance problem or so, the child is one table, one line, the customfield would be one table, one line. There is noo difference, guys, really.

Our plugin also calculates the weight http://extensions.virtuemart.net/products/custom-size-detail
You can set a dropdown as input, so you get exactly what you want (without children)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

#### servlet

• Jr. Member
• Posts: 348
• Business optimization
• VirtueMart Version: 3.2.2
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #10 on: January 30, 2017, 10:36:11 am »
Milbo, will you fill manually 10 000 lines per one product where every product has different values. I dont think so... You will prefer to fill 50 custom fields instead 10 000 child products... Child products are for small stores or for simple products...

By the way I Asked a question about CUSTOM SIZE plugin via extension.virtuemart.net but there is no response to this moment. Other vendors replay me up to 1 day but for the VM core extensions nothing...
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

#### Milbo

• Virtuemart Projectleader
• Administrator
• Super Hero
• Posts: 9853
• VM3.2 Cached and Optimized
• VirtueMart Version: VirtueMart 3 on joomla 3
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #11 on: January 30, 2017, 13:12:04 pm »
lol
no, man, you just do not child products. IT is EXACTLY the opposite. Child products are developed for stores with more than 100.000 products, you funny guy.

I think you really have no clue about, how they work, eh? Just an example.

A normal product loads
The product table
the product language table (up to three!)
the product pricing table
the product categories table
the product manufacturers table
the product medias table
the product customfields

a simple child product loads ONLY the product table, do you get the difference?

uhm, when did you write to extensoins? Matej my supporter is ill since 3 weeks. So when you wrote about email, it may slipped through, http://extensions.virtuemart.net/ticket
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

#### Studio 42

• Contributing Developer
• Sr. Member
• Posts: 3905
• Joomla & Virtuemart developper
• VirtueMart Version: 2.6 & 3
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #12 on: January 30, 2017, 13:30:04 pm »
lol, why the heck have you so much problems with childs? There is no performance problem or so, the child is one table, one line, the customfield would be one table, one line. There is noo difference, guys, really.

Our plugin also calculates the weight http://extensions.virtuemart.net/products/custom-size-detail
You can set a dropdown as input, so you get exactly what you want (without children)
I'm not really sure that having 200 childs have better performance that one price table ?
first, you need to get all products and set it before, one by one and use multi variant.
Compared to a price table you only have to set the list and get the index and don't need to reload full products on option changes.
Of course if you have many fields to use, a moment it's better to use child, but if you only have to use 2 or 3 fields per variant, i think that it's certainly 100 time faster and certainly more.

#### servlet

• Jr. Member
• Posts: 348
• Business optimization
• VirtueMart Version: 3.2.2
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #13 on: February 01, 2017, 10:50:43 am »
Thank you Milbo
I get difference...

However I need weight in custom fields
I will research for your extension CUSTOM SIZE
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

#### Milbo

• Virtuemart Projectleader
• Administrator
• Super Hero
• Posts: 9853
• VM3.2 Cached and Optimized
• VirtueMart Version: VirtueMart 3 on joomla 3
##### Re: GENERAL QUESTION: Weight of custom fields
« Reply #14 on: February 01, 2017, 23:40:05 pm »
I'm not really sure that having 200 childs have better performance that one price table ?
Childs deliver exactly that, you can have 200 products with ONE price row.

first, you need to get all products and set it before, one by one and use multi variant.
Basic concept of VM. Pattern have NOTHING todo with Multivariant or generic child variants.

Compared to a price table you only have to set the list and get the index and don't need to reload full products on option changes.
Of course if you have many fields to use, a moment it's better to use child, but if you only have to use 2 or 3 fields per variant, i think that it's certainly 100 time faster and certainly more.

Our customsize plugin does that. You can enter values which create a dropdown and set a factor between the size (m,m²,m³ for example). So it calculates directly the correct weight. the big reason for vm3 actually. In vm2 it was not possible to do this clean.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/