VirtueMart 2 + 3 > 3rd party extension

Simple VM3 Product Cart Variant Custom Field / Attribute Plugin [ FREE ]

(1/14) > >>

AH:
Designed to offer a simple way to setup product variants such as size / colour etc - without the  need to create multiple VM products

Update April 2021 - Version 6.1

* Support for Language Keys in Title and Variant names
* Add a new option to allow the price to be shown next to the variant option when using a multiply modifier (*)
Update March 2021 - Version 6
GJC - Great idea to display variant in the cart using its own template, allowing for simple adjustments to be made
New tmpl/cartdisplay.php - can now be styled to control the look of the items in the cart


Update June 2018 - Version 5.1

* Removed some old vm2 functions: plgVmDisplayInOrderCustom, plgVmCreateOrderLinesCustom
* Tidied up preparecartproduct function and coded to handle accidental spaces that may have been set by the user in the parameter for modifier value (mv - below)
* Modified the template to handle the display of variants where accidental spaces have been set by the use in the modifier value (mv - below)
Tested on VM3 using J3  PHP7.  Its functionality is based on the original DROPBOX by PRO - This version has greater functionality  :)

Download zip file is at the bottom of this post


This plugin does not handle stock control at a variant level

Plugin Features:

    Apply A Template Of Options with just 1 Click includes pricing adjustments -     Options are configured as a simple comma separated List
    Creates a Product drop down selection list of cart variants Or a Radio List (Radio list is new option in version 5 - thanks to Stefano Pascucci )

    Price Variants supported for each cart variant:-

*    Standard sales price + or -
*    Standard sales price Multiplied by a value (including decimals)   e.g. *2.5 ,  *.5 , *1
*    Fixed price (overrides Standard sales price)
*    Append string to SKU (adds a string to the original SKU - useful for analytics and export of order lines)
*    Fix the weight (Overrides the product weight) Each variant can use a different price rule

Additionally you can adjust cart weight using the price multiplier * Where the Multiply rule is used, you can optionally modify the cart product weight by the same factor, (Configuration option for each Product cart customfield variant)

Instructions:
Install The Plugin,  Enable It
Go to custom fields.
Click "new"

Fill in the title. 
Make it a cart variant and cart input.
Additional parameters - Choose Plugins, Then "VMCustom - VM Product Cart Variants"
If you save at this point the configuration parameters will be shown. (If you alrady know what to complete - you can just add the parameters required)
Fill In the option field separated by Commas.
Then save.

Structure t@mv,
t = Item variant - Drop selection text and Item variant text that will show in cart
@ = separates the modifier from the selection text - If there is no modifier nothing else is needed
m = modifier either + - * or =
v = modifier value
, = separates variants

Examples

1.Simple selections no price adjust
Config: Red,Green,Blue
All variants are at Retail

2.Adjust the price + or -
Config: Sml,Med@+1,Lrg@+2
Give prices of: Sml = Retail, Med = Retail +1, Lrg = Retail +2

3.Multiply the price *
Config: 1m,2m@*2,3m@*3
Gives prices of: 1m = Retail, 2m = Retail * 2, 3m = Retail * 3

You can also use decimals here e.g. 1 feet,1.5 feet@*1.5,2 feet@*2

4.Sell fixed multiples *
Config: 2kg@*2,4kg@*4,6kg@*6

5.Fix the price of a variant
Config: Red,Green,Blue@=12.50
Gives prices of: Red Green = Retail, Blue = 12.50

And of course you can do a combination of all of the above

6. Append a string to the sku
Config: Sml@@sml,Med@+1@med,Lrg@+2@lrg
Gives SKU's of: SKU: origsku-sml, origsku-med, origsku-lrg

Note: you need 2@ symbols before the sku variant else you will change some other setting

7. Change the cart weight for a variant

Config: Sml,Med@@@2,Lrg@@@4
Gives cart weight of: Sml = product weight, Med = 2, Lrg = 4

Note: you need 3 @ symbols in a variant for the weight to be set correctly otherwise you will change some other setting
Setting a weight using this parameter will override any weight calculated by the multiplier option.


8. Product variant selections can be a set of mixed types if required
Config: Sml@*2,Med@+12,Lrg@-2
The custom field setup WILL save to the product with price variations.
You can adjust this in an individual product if required.


Multiple Cart variant customfields
It is possible to have multiple Cart variant customfields for a product
Each Cart variant customfields creates its' own value based on the Standard sales price of the item. They are not chained or linked, a selection in one product drop box that produces a price variant will not affect any other drop box calculation. 



The plugin is offered "as is" so make sure you test thoroughly before deploying in a live environment.

AH:
Updated version.

lekreator:
its possible to make percentage?

IE: variant 1 20%, variant 2 30% ?

AH:

--- Quote ---IE: variant 1 20%, variant 2 30% ?
--- End quote ---


--- Code: ---3.Multiply the price *
Config: 1m,2m@*2,3m@*3
Gives prices of: 1m = Retail, 2m = Retail * 2, 3m = Retail * 3

You can also use decimals here e.g. 1 feet,1.5 feet@*1.5,2 feet@*2
--- End code ---

So to increase by 50% =  *1.5
To decrease to 90% = *.9

arkimede360:
Hi, the price is whitout tax, es:


--- Code: ---15 gg lavorativi@+60
--- End code ---

How to add price with tax?

Thank you.

Navigation

[0] Message Index

[#] Next page

Go to full version