News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Product showing price per meter, order by centimeter

Started by c2k5, July 28, 2012, 09:28:43 AM

Previous topic - Next topic

c2k5

Hi there,

It has been a while but i've picked up Virtuemart again and noticed that the new version has custom fields now. I've spend yesterday evening trying to come up with a solution for the following situation:

There is a fabric product which has a price per meter (lets say 10 euro's). This is what the customer is interested in to view when he/she is browsing fabrics. It's common to order a specific number of centimeters of fabric. So 50 cm should be 5 euro's, 51 cm 5,10 euros etc.

What I did is add a custom field with the name centimeter (dropbox) with the price per centimeter (0,10cent). When you order 100 times the centimeter quantity the price is calculated like this: 100x,0.10 + 10 (productprice) = 20 euros. Though it should be 10 euro's.

My question, unless i'm missing something, should be: how can I make sure that the product price doesn't add up to the 100 centimeter price.
BTW: a customer can order any given numer so preset values like 10, 20, 30, don't work.

Thanks in advance!

easy

hi there,
it will work your way if you will setup any minimum price/length
i.e. your fabric costs €10/m but minimum order is 1m - it can be sorted by product price and now you can use custom fields to add extra length above the minimum.
But it is not best solution because you will need to add so many custom fields.

You can try this plugin http://extensions.virtuemart.net/extensions-virtuemart-2/custom-size-detail you will need to change some code to display price per m on product page and how many cm was ordered in the cart but it works.

If you have basic product pricing then it will work as a charm. If you wwant to increase its price per meter by adding some extra option then please have a look at my post here and better wait until this plugin developer reply.

I hope I helped somehow, good luck!

PS. or maybe just let your customer to order "1.23"m or "5.72"m or even "0.10" - just change price field a little (add two decimals etc...)