VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: sandomatyas on January 26, 2021, 12:40:47 PM

Title: Special unit price if you buy a whole box
Post by: sandomatyas on January 26, 2021, 12:40:47 PM
There are product where are 4 or 6 or 8 or 10 units in a box, it depends on the product.
Is it possible to set a second unit price if the seller doesn't need to open a box to serve the customer?
Like if you buy 1, 2 or 3 etc the unit price is like $10 but if you buy 4/8/12/16 etc, so the amount can be divided by the unit number in the box, the unit price is $8
Title: Re: Special unit price if you buy a whole box
Post by: Jörgen on January 26, 2021, 12:43:31 PM
Istraxx Virtuemart extension store has a quantity price calculation plugin. I use it myself, It has all the option you seem to need.

Jörgen @ Kreativ Fotografi
Title: Re: Special unit price if you buy a whole box
Post by: kacie_23 on February 12, 2021, 21:46:04 PM
Yes....

I am writing a similar application for products where I change the prices based on multiples of 10.
One price for 0-10, 10-100, 100-1000 etc.

I have added a SQL table,  and a custom module that can set the prices based on a form-input.
The ovverridden function sublayouts/prices.php, collects the values in an helper function, and when I increment the amount a script changes the price.

This is not entirely straightforward, but require you to write some SQL, php, and javascript code .

Kacie
Title: Re: Special unit price if you buy a whole box
Post by: sandomatyas on March 11, 2021, 09:17:38 AM
Quote from: Jörgen on January 26, 2021, 12:43:31 PM
Istraxx Virtuemart extension store has a quantity price calculation plugin. I use it myself, It has all the option you seem to need.

Jörgen @ Kreativ Fotografi

I've sent a question but no answer.

But here is screenshot what I need:
https://snipboard.io/6Vgauk.jpg

There are two add-to-cart sublayouts. One for the unit and one for the box if it's available. You can  have e.g. 2 boxes and 3 units in the cart at the same time.
Is it possible to do without child products? There are >10.000 products and counting.
Title: Re: Special unit price if you buy a whole box
Post by: pinochico on March 11, 2021, 18:00:33 PM
Once we had to program a plugin for one customer for the sale of products for boxes / cartons / pallets - the sale of beer bottles
If the products had a customfield of the plugin type - box / carton / pallet sale, the customer saw only one add to cart with the option to sell the product on boxes / cartons / pallets.

Unfortunately, in the end the customer did not order this functionality / plugin, so we stopped the development of the plugin.

I don't know if this is exactly what you need, I would need to know more details.