Author Topic: Any pricing depending on the value of a dropdown list possible?  (Read 171 times)

mrmysterious

  • Beginner
  • *
  • Posts: 34
  • A beginner
Any pricing depending on the value of a dropdown list possible?
« on: February 12, 2018, 05:08:35 am »
Hello,

hope anyone can help with that. As you see in the pic I have created a dropdown list from which the user can select one choice at a time for any product.
As these are NO categories (I try to avoid having categories) I wonder if and how I can make a pricing whenever the selected value is changed by the user.

Example:

Costumer choses "Aldi" which will cost 4,99 EUR and puts that into the cart and goes on shopping.
For the next choice is "Basic" that will cost another 4,99 EUR so the total will then be 9,98 EUR.
And so on. Until the user is checking out the order.

Basically selecting different choices should increase the total. I wonder how to achive that???



Cheers
mrm

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1299
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #1 on: February 12, 2018, 06:57:45 am »
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2724
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #2 on: February 12, 2018, 11:00:01 am »
If you want dynamic prices from different source, you need to use a database price table.
field : Id, markt, price, SKU
You have then to use same SKU(or gtin), so you can get right price and dynamic change it using a custom field plugin(this need to be coded)
markt + SKU is used as relation with your price table to get right price in tha cart too when user select it in the list.

mrmysterious

  • Beginner
  • *
  • Posts: 34
  • A beginner
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #3 on: February 12, 2018, 21:14:05 pm »
If you want dynamic prices from different source, you need to use a database price table.
field : Id, markt, price, SKU
You have then to use same SKU(or gtin), so you can get right price and dynamic change it using a custom field plugin(this need to be coded)
markt + SKU is used as relation with your price table to get right price in tha cart too when user select it in the list.

Thank you so much - but - this sounds a bit complicated. I have further questions:

1. I create a database price table - directly in the database? Or is there any chance within the joomla cms?

2. I use a custom field plugin - are there different ones? Which one can you recommend?

3. You say: " this needs to be coded" - what code will I have to put there?

Thanks for now.

mrmysterious

  • Beginner
  • *
  • Posts: 34
  • A beginner
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #4 on: February 12, 2018, 23:19:21 pm »
Additionally:

I have thought about the main problem. Maybe I should invent categories to make it less complicated BUT:

I will have only one product per category (which is a custom text area where customer can write what to deliver from a non-virtual -real -market).
So - depending on how many products (defined by the amount selected) the customer orders there will be a discount

BUT

if the customer orders from more than one category (real market) there will be additional cost (because the driver has more effort going to second or third market to buy things)

Example:

order from market 1:

10 products each 1 EUR = 10 EUR
plus
Basic price for 1 market = 5,99 EUR
Total = 15,99 EUR

---------------------------------------------

another customer orders the same BUT also from second market:
5 products from market 1 and 5 products from market 2
There will another Basic price to be charged: 5,99 EUR
Total for customer 2 = 21,98 EUR (15,99+5,99)

-------------------------------------------------------------------------

Last example: 3rd customer will order from three different markets:
Price per market = 5,99 EUR.  Total = 17,97 EUR.
He orders 30 Products. These are 1 EUR per product = 30 EUR
Grand Total = 47,97 EUR

This is the delivery cost (plus customer will pay regular product price from the real market)

I just do not know how to do this pricing...maybe there is a plugin or module available.
   

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2724
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #5 on: February 12, 2018, 23:57:52 pm »
If you dont know how Joomla work and how to write a customfield plugin, you can not do this by yourself.
Read Joomla sample codes about plugin and install sql, textinput customfield plugin php code then you can perhaps do yourself what your need for your request.

mrmysterious

  • Beginner
  • *
  • Posts: 34
  • A beginner
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #6 on: February 13, 2018, 00:08:21 am »
Thank you. As I guess this is hard work. I won't be able to do that... :-\

Here WAS just what I needed:

https://forum.virtuemart.net/index.php?topic=108063.msg361431#msg361431

Unfortunatly links are dead.

cheers
mrm

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2724
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #7 on: February 13, 2018, 00:31:08 am »
This is not a big task.
To do a shipping plugin per categories and add shipping cost, if a product is in this category. The most complex part, is your selectable price per market to do a easy update system when you need to change prices.
But a solution is to use child product perhaps and generic child variant, so you can set price in each child ?
But when you dont know the full project, it's hard to give the right solution.

mrmysterious

  • Beginner
  • *
  • Posts: 34
  • A beginner
Re: Any pricing depending on the value of a dropdown list possible?
« Reply #8 on: February 13, 2018, 17:36:59 pm »
Thank you.

Here I found exactly what I need:

http://open-tools.net/virtuemart/advanced-shipping-by-rules.html