News:

Support the VirtueMart project and become a member

Main Menu

A little help to set-up quantity product base price

Started by bobthebob01, December 28, 2015, 19:10:50 PM

Previous topic - Next topic

bobthebob01

Hi,

I'm a bit new or a return user of VM after many many years. And I'm not sure if it's because I don't use the correct terminology but I can not seem to find the answer to my question.
I'm using Joomla 3.4.8 with VM 3.0.12.
The shop is selling candies. There are 6 different flavours. Each flavour has its own SKU.
Each candy comes in 2 formats regular or large. Each size has its own SKU as well.
Therefore for each candy flavour, there are 2 SKUs

Each candy can be bought in the following manner:
- by the unit : 2$/candy
- by box of 6: 10$/box of 6
- by box of 12: 19$/box of 12
- by box of 24: 40$/box of 24

I created my main/parent products using the large size SKU (Always try to push for the biggest product!), and child product for the regular size.

I created a custom field for the child product variant using the "Generic child variant" custom field. And it works fine.

And this is where I'm stock. How can set a drop down option list that would show:
Single candy: 2$
Box of 6 candies: 10$
Box of 12 candies: 19$
Box of 24 candies: 40$

while still having the quantity box calculating the correct price and also making sure the weight is also updated accordingly for the shipping plugin.

So if client select "Box of 24 candies: 40$" and increase the quantity box to 2 for example. The total cost should be 80$ and the total weight would be equal to 40 single candies.

I've tried the "VM3 Product Options Custom Field Dropbox Plugin" (http://forum.virtuemart.net/index.php?topic=127362.0). And at first, it seems to work, but the issue is to multiple the weight of the product. As in my case, the price value is not equal to the multiplier value of the weight.
ex of the plugin: box of 12@=19
But the weight is not 19 times more. it's only 12. And as far as I can read, the plugin does not have an option to have a different multiplier for the weight and cost.

Any help pointing at the right direction would be greatly appreciated.

Thank you in advance.

Cheers

ps: and happy and great holliday season to all.

Studio 42

Hi,
use the "Generic child variant" custom field
You need to set the right weight in each child variant, not only in main product, else main(parent) product weight is used and this is same for all other datas excluded product name and alias and 1 or 2 other fields.
greets,
Patrick

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

bobthebob01

Thanks Studio 42 and jenkinhill for your reply.

I also thought about this but the issue I have with chid "Generic child variant" is that you need to navigate to the product page in order to add to cart. This adds unnecessary clicks to buy in my case.
Since my products don't have a much difference in the description beside the flavour. Right now, I made my category view so client can add to cart product from the same page, making it super easy and fast to add different products (flavour) to the cart.
I was ok with having the page loading the product detail page if client select the "regular" size candy. But it would certainly be more user friendly and efficient to avoid these additional clicks. I'm pretty sure it would naturally increase sales.

It's really too bad we can not reload price and product from the category view like with Woocommerce. Don't get me wrong, I'm not saying woocommerce is better. I've been using Joomla! since its fork form Mambo and have built dozens of sites with it. And VM is to me, the best ecommerce extension for Joomla.
I would like to stick with it.

Does anybody know a way to load the child variant in category view using AJAX?
I've searched a lot about this and could find anything.

Studio 42

You can use a main product as a "model". Simply create child from main product and add category in childs too. This save you many time.
Some plugin exist to change the way the childs are displayed too (or some package plugins).
I think, you have not found the right solution ;)
See for eg the attached image. This are all childrens and adding a add to cart button for  each chidlren, is not a problem at all

bobthebob01

Happy new year to everyone.

Hi Studio 42,

I suspect also that I'm not finding the solution as opposed to not being able to do with VM. It's often because one project community will use different terminology than others, e.g: component/extension. And add to that, English not being my mother tongue; it can get tricky.

But is your screenshot taken from a category page or product detail page?

Cheers

Studio 42

This is a product details page and image on left are the (uncategorisezà childrens.
If you prefer, you can write in german or french.
But the product custom "plugins" are addon for virtuemart products to extend Virtuemart core functionnality.
It's used as the core custom fields but can be recoded for customers needs.

lindapowers

If possible try using string custom field which is the only one that wont redirect the customer to the detail view with a reload after each selection. We and many others have the same frustration with the redirect and reload of the variants for childs and multivariants.