VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: clivemorley on November 01, 2018, 20:13:40 PM

Title: Custom Field Pricing
Post by: clivemorley on November 01, 2018, 20:13:40 PM
I wonder if you can help with a problems that has be baffling me for some time.

I am looking to upgrade a site that is currently running Joomla 1.5 and Virteumart 1.1.9 I am desperate to upgrade to Joomla 3.9 and Virtuemart 3.4.2

The site sells key blanks and also gives the option to have keys cut.  The site is setup with quantity breaks as follows;
1-1
2-4
5+
With a different price for each quantity break.  We also give the customer the option to have a key cut, at an extra flat cost of £2 per key regardless of the number of keys that they order.

With Virtuemart 1.1.19, I was able to apply the extra fee of £2 per key without too many problems.  However, with Virtuemart 3.2.14 and Custom Fields, I have so far been unable to add a flat fee with quantity breaks in place.  Every time I add a custom field to the product instead of adding a flat fee of £2, it uses the product calculation.

For example

Key Blank AB1 (please see my test new site below)
http://s205974869.websitehome.co.uk/KT/Cylinder-Keys/ABUS/AB1-Key-Blank.html (http://s205974869.websitehome.co.uk/KT/Cylinder-Keys/ABUS/AB1-Key-Blank.html)

The product is setup with a cost price of £0.23, we then apply the following prices

1-1   + 1135% to get £2.84 each
2-4 + 902% to get £2.30 each
5+  + 769% to get £2.00 each

When I add an option to include a cutting fee at a cost of £2 per key, we get prices as follows

1-1  £27.54  (£2.00 * 1135% + £2 + £2.84)
2-4  £22.34  (£2.00 * 902% + £2 + £2.30)
5+   £19.38   (£2.00 * 769% + £2 + £2.00)

What I am looking to to get is

1-1  £4.84  (£2.00 (cutting fee) + £2.84)
2-4  £4.30  (£2.00 (cutting fee)+ £2.30)
5+   £4 .00 (£2.00 (cutting fee)+ £2.00)

Is anyone aware of a method to add a Custom Field at a flat rate and not use the Price Rule?

Many thanks

Clive
Title: Re: Custom Field Pricing
Post by: GJC Web Design on November 01, 2018, 20:36:38 PM
have u tried this plugin:  https://forum.virtuemart.net/index.php?topic=127362.0

might be a bit easier
Title: Re: Custom Field Pricing
Post by: clivemorley on November 12, 2018, 20:13:08 PM
Thanks for the feedback, but that does not seem to be working for me.  Maybe I am doing something wrong.
I have setup a test product and rules as follows.

Test Product
(http://s205974869.websitehome.co.uk//KT/images/Test%20Product.jpg)

Test Calculation which adds 100% to the cost price of the test product
(http://s205974869.websitehome.co.uk//KT/images/Test%20Calculation.jpg)

Custom Field, radio option to have the key blank or cut +£2 to be cut
(http://s205974869.websitehome.co.uk/KT/images/Custom%20Field.jpg)

When we look at the test product on the front end, with the option set to no, the product prices is £0.46 ex vat
(http://s205974869.websitehome.co.uk/KT/images/Test%20Key%201.jpg)

But when i selected the Yes option +£2, instead of adding just £2, it adds £4
(http://s205974869.websitehome.co.uk/KT/images/Test%20Key%202.jpg)

Please help?

Cheers

Clive
Title: Re: Custom Field Pricing
Post by: clivemorley on December 18, 2018, 15:50:27 PM
Anyone!??
Title: Re: Custom Field Pricing
Post by: Jörgen on December 18, 2018, 16:04:29 PM
Turn off your 100 % and see what happens
Jörgen @ Kreativ
Title: Re: Custom Field Pricing
Post by: clivemorley on December 18, 2018, 17:22:20 PM
Thanks for suggestion.

I have disabled the the +100% Calculation rule on the product and yes all works fine, if I add the custom field to the product.  The only problem is that i need the custom rule to calculate the selling price based on our cost price.  We will also be using quantity based pricing, so will require calculations for that as well.

Do you have any other thoughts?
Title: Re: Custom Field Pricing
Post by: jenkinhill on December 18, 2018, 18:30:06 PM

Quote from: clivemorley on December 18, 2018, 17:22:20 PM
We will also be using quantity based pricing, so will require calculations for that as well.

As pricing is already complicated you could maybe use this plugin:
https://extensions.virtuemart.net/product/products/quantity-related-price-calculation-detail
Title: Re: Custom Field Pricing
Post by: clivemorley on December 18, 2018, 20:07:36 PM
I have tried that extension but same problem as above.  When the pricing is setup as cost price +% to get the sale price, the percentage increase is also used for the custom extension as well.

Am I doing something wrong?
Title: Re: Custom Field Pricing
Post by: AH on December 19, 2018, 13:51:14 PM
The qvariant plugin adds the value to the base price

You then double the base price using a category rule

Why not just set the cost price with the 100% already included

Title: Re: Custom Field Pricing
Post by: Jörgen on December 19, 2018, 14:05:59 PM
Using calculation rules is a somewhat good idea to manage prices. I can just assign a product to the 125 % markup rule and I am done. Later changing cost price and the product gets the "correct" markup. Either the display of the plugin addition should be displayed with the markup included or the plugin addition would be made after the markup. I do not use these kind of plugins right now so I can not say if my advice is wrong. But somehow the two systems do not seem to be compatible. If custom field additions to the price newer should be affected by calculation rules then they should be added to base price after the calculation rule is used on the base price.
It does not work that way right now, the question is, is this wrong or is this the right way to do it ?

my 2 cents

Jörgen @ Kreativ Fotografi