Author Topic: Custom Field Pricing  (Read 723 times)

clivemorley

  • Beginner
  • *
  • Posts: 20
Custom Field Pricing
« 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

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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8733
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Custom Field Pricing
« Reply #1 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

clivemorley

  • Beginner
  • *
  • Posts: 20
Re: Custom Field Pricing
« Reply #2 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


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

clivemorley

  • Beginner
  • *
  • Posts: 20
Re: Custom Field Pricing
« Reply #3 on: December 18, 2018, 15:50:27 pm »
Anyone!??

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1914
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Custom Field Pricing
« Reply #4 on: December 18, 2018, 16:04:29 pm »
Turn off your 100 % and see what happens
Jörgen @ Kreativ
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

clivemorley

  • Beginner
  • *
  • Posts: 20
Re: Custom Field Pricing
« Reply #5 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?

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27211
  • Always on vacation
    • Jenkin Hill Internet
Re: Custom Field Pricing
« Reply #6 on: December 18, 2018, 18:30:06 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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.9989 on Joomla 3.9.2 PHP 7.0.33
Testing VM 3.4.3.10014 on Joomla 3.9.2

clivemorley

  • Beginner
  • *
  • Posts: 20
Re: Custom Field Pricing
« Reply #7 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?

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2842
  • VirtueMart Version: 3.4
Re: Custom Field Pricing
« Reply #8 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

regards
A

Joomla 3.9.1
php 7.1

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1914
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Custom Field Pricing
« Reply #9 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
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)