News:

Support the VirtueMart project and become a member

Main Menu

Custom Field Pricing

Started by clivemorley, November 01, 2018, 20:13:40 PM

Previous topic - Next topic

clivemorley

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

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

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

clivemorley

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


Test Calculation which adds 100% to the cost price of the test product


Custom Field, radio option to have the key blank or cut +£2 to be cut


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


But when i selected the Yes option +£2, instead of adding just £2, it adds £4


Please help?

Cheers

Clive


Jörgen

Turn off your 100 % and see what happens
Jörgen @ Kreativ
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

clivemorley

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?

jenkinhill


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
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

clivemorley

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?

AH

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

Regards
A

Joomla 4.4.5
php 8.1

Jörgen

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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.