VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: Hawker on July 01, 2019, 11:41:13 AM

Title: String Custom Field Price Difference, Without Duplication
Post by: Hawker on July 01, 2019, 11:41:13 AM
In the String Custom Field, what is the functional difference between:

(i) defining semicolon-separated specifications in the Custom Field's own 'Default value' box;
(ii) adding the same Custom Field twice to a Product, with different associated 'Value's (in Product>Custom Fields)?

If a seller is selling prints that can be signed or not, then I know that these variables are made when linking the custom field to the product. (i.e. they are made at the back-end product page, so that a price difference can be applied).

However, if the seller is selling more than one signable print (each with its own product page), then how can (s)he define:

   • unsigned print
   • signed print (+ $5.00)

...without having to duplicate the above variables every time the String custom field is attached to a product?

Defining semicolon-separated specifications in the Custom Field's own 'Default value' box does not have the functionality of adding a price supplement to the product variant.
The attached diagram shows the two data input places being referred to in VM3.
Thanks in advance for any advice.
Title: Re: String Custom Field Price Difference, Without Duplication
Post by: Jörgen on July 01, 2019, 12:54:43 PM
https://docs.virtuemart.net/manual/general-concepts/186-derived-products-product-pattern-child-products.html (https://docs.virtuemart.net/manual/general-concepts/186-derived-products-product-pattern-child-products.html)

Jörgen @ Kreativ Fotografi
Title: Re: String Custom Field Price Difference, Without Duplication
Post by: Hawker on July 01, 2019, 17:12:36 PM
Thanks for the link Jörgen.

I understand the difference between parent and child products. Generic Child Variants only offer basic product variables:

The documentation in the link refers to pre-2015 VM2.

My original question referred to customers being able to indicate which product variable they wanted, without the shop keeper having to make child products. This is because there would be no point in having two products, for 'signed' and 'unsigned' prints, because those are not different enough, and the price difference can be applied with a String Custom Field. (No separate stock count is needed for 'signed prints').

The original question stands:

Can the product-side price variables of String Custom Fields be set up generically, so that they can be applied, pre-set, to more than one product? The answer may be "no".
Title: Re: String Custom Field Price Difference, Without Duplication
Post by: Jörgen on July 01, 2019, 21:14:48 PM
This is a work in progress, but it is my live shop, no test shop.
https://cms.kreativfotografi.se/index.php?option=com_virtuemart&lang=en&view=productdetails&virtuemart_product_id=2440&virtuemart_category_id=101&Itemid=743 (https://cms.kreativfotografi.se/index.php?option=com_virtuemart&lang=en&view=productdetails&virtuemart_product_id=2440&virtuemart_category_id=101&Itemid=743)

It is a hidden parent with the approriate custom fields, technique, material, size, frame and edition.
Then a child for every image. This has then the "numbered" childs as children #1,#2 and so on.

I edit the inherited custom fields for the first generation child and the the lowest children get names as #1, #2 and so on.
You can override and edit every customfield at any level.

Just an idea, You may do it differently, instead of child You could have signed item custom field.

Jörgen @ Kreativ Fotografi
Title: Re: String Custom Field Price Difference, Without Duplication
Post by: Hawker on July 03, 2019, 18:41:07 PM
Thanks Jörgen.

This issue is to do with:
(i) implementing product variants using String custom fields without having to make unnecessary child products and
(ii) knowing if string custom fields that add a price premium can be made and used generically for more than one product.