News:

Looking for documentation? Take a look on our wiki

Main Menu

Any pricing depending on the value of a dropdown list possible?

Started by mrmysterious, February 12, 2018, 05:08:35 AM

Previous topic - Next topic

mrmysterious

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
Joomla!-Version 3.8.5
VirtueMart 3.2.12
Template As002053free (customized)
OS Linux h
PHP 5.6.30
MySQL 5.6.19-67.0-log

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

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

Quote from: Studio 42 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.

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.
Joomla!-Version 3.8.5
VirtueMart 3.2.12
Template As002053free (customized)
OS Linux h
PHP 5.6.30
MySQL 5.6.19-67.0-log

mrmysterious

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.
   
Joomla!-Version 3.8.5
VirtueMart 3.2.12
Template As002053free (customized)
OS Linux h
PHP 5.6.30
MySQL 5.6.19-67.0-log

Studio 42

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

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
Joomla!-Version 3.8.5
VirtueMart 3.2.12
Template As002053free (customized)
OS Linux h
PHP 5.6.30
MySQL 5.6.19-67.0-log

Studio 42

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

Joomla!-Version 3.8.5
VirtueMart 3.2.12
Template As002053free (customized)
OS Linux h
PHP 5.6.30
MySQL 5.6.19-67.0-log