News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Product Addons

Started by bsjelin, March 06, 2017, 21:26:10 PM

Previous topic - Next topic

bsjelin

Hello - this is a super simple question, but I cant seem to find a straight answer on any of the other forum posts.

What I'm trying to do is simple... a product addon that can be attached to any product without creating 5,000 child products.

Example:

Gift Wrapping: +$5.00
Autographed: +$5.00

Just a simple checkbox to increase the price of the product by the amount mentioned. Hopefully that make sense. I tried using the multi-variation option but that still just creates tons of child products.

Thanks in advance!

PS~ Forgot to mention I am working with the newest version of Virtuemart at the moment. 3.0.18

Studio 42

You can use the list option with value Yes/No and set price to +$5.00 in case of yes.
YOu can use this for customfield string, and  you see then in cart
Gift Wrapping : yes(or no)
Autographed : yes(or no)
in the cart

bsjelin

I think I tried that once and it wouldn't update if they went back to NO after - say if they changed their mind and switched it back to NO, the total price remained the same.

Is there any way to set it up as a checkbox option instead maybe?

Studio 42

YOu can siwtch from list to ratio button directly.
Else for checkbox You can override the layout in your template
YOURSITE\components\com_virtuemart\sublayouts\customfield.php
search for
            case 'B':
            case 'S':
            case 'M':

and modify the code after.

bsjelin

I found this - not EXACTLY what I was looking for but seems to have done things a little easier.

https://forum.virtuemart.net/index.php?topic=127362.0

Hopefully it stays up to date - I'd prefer to do it without any plugins or hacks.

balai


Studio 42

Quote from: bsjelin on March 07, 2017, 01:16:04 AM

Hopefully it stays up to date - I'd prefer to do it without any plugins or hacks.

Hi,
overriding a file is not a hack
And "without any plugins", is what you do now ;)