News:

Support the VirtueMart project and become a member

Main Menu

Custom Field Cart variant of product weight

Started by rckmad, January 22, 2013, 23:32:09 PM

Previous topic - Next topic

rckmad

I need to create a custom field cart variant that not only change the price of the product but also change the product weight to calculate the shipping.
How can I do that?
I didn't find a way
It is a site that sells plants and each plant have different choices for the pot, and each pot weight different.

Thanks in advance

Joomla 2.5
VM 2

Mysterion

I have the exact same requirement. Did you ever find a solution to this seemingly fairly standard requirement?

Many thanks - David

webbits

Same situation here....can someone at Viturmart help us out?  Did either of you find a solution?  I need to generate either the correct weight or have cart variant override the "quantity field" in order to correctly calculate UPS shipping charges.


Thanks,
Ivey

PolishedGeek

Hello -  We inquired a while back about this with Max Milbers, the VM lead developer. We'd like to be able to adjust weight via our "Breezing Forms Custom Fields" extension and can't do it yet either. Max said the ability to adjust weight and dimensions based on attributes or custom fields is coming in 2.2, I believe.

So unfortunately, it's not possible right now, even with a custom field plugin. :(
~ Deb Cinkus, CEO
Polished Geek, LLC   |    www.PolishedGeek.com

Creators of JoomLister - eBay Lister for Joomla!

webbits

Thanks!  For the reply that is....Polished Geek had really improved the site as it now stands; Your plug in and Breezing Form rock.....solving the weight challenges is the last thing need for launch.

FYI - Fields turn on/turn off really saved a lot of manual labor avoiding have to create a list of cart variants by each product.

Ivey


dj_mystery

hi mate, i have the same issue and i was wandering if you found any solution. i realized this problem a little bit late, after i have setup about 600 products with custom fields and its big issue for me to find the solution. thanx

PolishedGeek

Are you asking about the solution for the weight issue, and whether it can be controlled by custom fields?
~ Deb Cinkus, CEO
Polished Geek, LLC   |    www.PolishedGeek.com

Creators of JoomLister - eBay Lister for Joomla!

PRO

#7
this can be done with child products easy

OR

in regards to changing the shipping price based on the custom.

a custom field product plugin that talks to a shipping plugin can do this.

The custom field plugin just has to define the variable

& in the shipping plugin

&getOrderWeight($cart, $method->weight_unit){
$newOrderWeight=code here
return $newOrderWeight;
}


OR

IF it's a small shop, with only a few products & custom fields (and using native customs NOT plugins), this can be done with just a shipping plugin & matching the "custom field id". This is too much code & hard to manage on a large site though.


dj_mystery

Here is my problem :
I am developing an eshop with herbs and spices. So the default weight that a customer can buy for each product is 0.100 Kg (and this is also the default  weight  for each product in the backend). I have made custom fields for weight options (100gr, 200gr, 300gr ......) but independently from the selected option the final product in the cart has always as weight 0.100. I am looking  for a solution than can bridge the custom field weight with the actual weight in the cart so I will have right calculation in shipping costs.

webbits

PRO - you make it sound so easy.  I would not know where to begin to make such a plugin.  There are less than six items in the cart that require weight adjustments....what would be the cost to get the plugin out of your head and into a useable file for distribution?  You would be welcomed to test with my site....

Thanks.....

PRO


webbits

6 product each with quantities in increments of 250 going up to 5,000.   I am dealing with sheets/reams of printed paper; or selling at half ream increments.

There are so many variables I would like to keep it simple for the buyer and the site owner.  It has been a fun adventure automating the ordering process.  Weight is the final challenge.

Thanks for you input thus far.  If any ideas or models come to mind please let us know.  *smiling

Ivey




leeburstroghm

I require the exact same options.. I have a cart variant, custom fields, for sizes.. the cost does change, however we really need the weight to change so the shipping module that calculates by weight, will work correctly!!

This is very important.. it seems like it would not be a big deal, for someone who understands VM and plugins, to take the existing custom field cart varient and add a weight, that will populate the correct weight in the cart..

Please. we would pay for this if someone can present it!!

PolishedGeek has breezing forms plugin, which is nice.. but nothing weight related.. this is a big deal!! any help. direction... do we have to use child products to accommodate for this little bit of functionality?
"If you make yourselves sheep, the wolves will eat you." -- Benjamin Franklin
Knowledge is the price for freedom. http://www.1215.org]http://www.1215.org

PolishedGeek

Thanks for the nod to our Breezing Forms Custom Fields solution! :)

We did spec out a customization to do this for a client a while ago, but he never moved forward with the project due to budget constraints. I'm happy to share what we proposed (you can contact us off the forum for pricing at https://polishedgeek.com/clients/contact.php).

The problem is that VirtueMart 2.0.x doesn't support weight modification, at least not last we checked. A while back we chatted with Max and he said they won't support it for custom fields until VirtueMart 2.2. If you can wait for that version, it's supposed to be out in Q4 this year. If someone must have this before the end of the year, what we propose is to add a new parameter to our Breezing Forms Custom Fields code, plus make a small hack to your calculated shipping plugins.

NOTE: This will require hacking all your shipping plugins that need the weight adjusted. As described here, the solution will only adjust the weight for the shipping calculation. If there are other places where you want/need the adjusted weight to be utilized, or the new weight to be displayed, this solution would require additional customizations to achieve that. If the end goal is just to be able to control the shipping weight based on the options chosen by the shopper, then this will work.

Here's the basic idea behind this solution.

1) Enhance our existing extension code to add a new field to adjust weight in the custom form of the product page.
2) Weight adjustment format would be "value|+price|+weight" (for example: "yes|+5.00|1.00" so it would add $5.00 and 1 kg or 1 pound or whatever, depending on your VirtueMart configuration).
3) Store that adjusted weight value in a variable when the shopper submits the form
4) Hack the shipping plugins to pick up that stored weight variable, and add it to the weight for that item, before it calculates the shipping cost.

The hardest part is modifying the various shipping plugins to support the weight as each one is different in how they process weight. The project cost would be a factor of the additional parameter work, which shipping plugins you are using, and how many plugins, and a few other factors.

Perhaps this proposed solution will spark some additional ideas as well!
~ Deb Cinkus, CEO
Polished Geek, LLC   |    www.PolishedGeek.com

Creators of JoomLister - eBay Lister for Joomla!

lindapowers

Hi, interesting post. I agree this is needed in VM2.

This will be great for fruit shops like ours and everyone that needs to sell products with cart variants per kg.