Author Topic: Custom fields again  (Read 636 times)

David

  • Beginner
  • *
  • Posts: 38
Custom fields again
« on: January 16, 2017, 00:30:58 am »
Let's have a software product to be sold by Virtuemart.
Price of the license is influenced by two parameters:
- number of users (1, 3, 5, or 10)
- license period (1, 2, or 3 years)

So there is a matrix of 4x3 possible prices of the product.

There is no need to keep stock numbers.

I assume that the only way how to achieve this is via Multi Variants, i.e. one parent product and 4x3=12 child products...?  Or is there a simpler way?
Joomla 3.6.5 , VirtueMart 3.2.1

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 540
  • Software Developer {PHP, JavaScript, jQuery, ...}
    • www.virtueplanet.com
  • VirtueMart Version: 3.2.1
Re: Custom fields again
« Reply #1 on: January 16, 2017, 09:08:36 am »
You can use normal String type custom field to achieve this. Since you do not maintain stock for the products you do not need Multi Variants.

David

  • Beginner
  • *
  • Posts: 38
Re: Custom fields again
« Reply #2 on: January 16, 2017, 12:25:43 pm »
I don't think I can use normal String fields.
Each combination of the previously mentioned 2 parameters makes a specific price, which cannot be achieved by simple +something price modifiers used by normal String fields.
The 2 parameters depend on each other.
Joomla 3.6.5 , VirtueMart 3.2.1

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1271
Re: Custom fields again
« Reply #3 on: January 17, 2017, 10:13:36 am »
I suppose you can try using child products.
Possibly the Stockable Custom Fields can help you
https://breakdesigns.net/extensions/stockable-custom-fields

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2101
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Custom fields again
« Reply #4 on: January 17, 2017, 17:36:41 pm »
I devlopped i price matrix similar to your case for a customer.
In he's case this are price steps for square meters, but with some changes, this can work with list too.
Contact me, if you don't find an existing solution.

David

  • Beginner
  • *
  • Posts: 38
Re: Custom fields again
« Reply #5 on: February 21, 2017, 18:44:06 pm »
This tutorial was very useful:
https://www.youtube.com/watch?v=dtdj_ei8iCY

However:
I have many products which share the same variant descriptions and values. Is it necessary to enter the descriptions and their values manually by each product, or is there a way how to predefine description name and values and then use it in multivariants?

For example, lets have 50 products, all being sold in 4 sizes and 4 colors. Do I have to enter manually in each product's custom field section multivariant that first description is called "Size" and has values "S, M, L, XL" and second description is called "Color" and has values "Red, White, Green, Blue"?
Joomla 3.6.5 , VirtueMart 3.2.1

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 8878
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

David

  • Beginner
  • *
  • Posts: 38
Re: Custom fields again
« Reply #7 on: February 27, 2017, 07:32:18 am »
Thanks. I dont understand that part on "fully customisable Variant", but I hope I dont need it.

Anyway: I have created an unpublished product as a pattern and then created a child.
However:
- neither category nor manufacturer were inherited
- after deleting the child product, an "orphan" row remains instead of it on the Custom Fields tab of its parent, and every attempt to save the parent product generates errors:
vmError: VmTable #__virtuemart_products_cs_cz Check not passed. Neither slug nor obligatory value at product_name for auto slug creation is given 29
vmError: You are not an administrator or the correct vendor, storing of product cancelled
Joomla 3.6.5 , VirtueMart 3.2.1

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 8878
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Custom fields again
« Reply #8 on: February 27, 2017, 09:36:34 am »
"- neither category nor manufacturer were inherited"
How do you know?

"- after deleting the child product, an "orphan" row remains instead of it on the Custom Fields tab of its parent,"
fixed in the next version
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

David

  • Beginner
  • *
  • Posts: 38
Re: Custom fields again
« Reply #9 on: February 27, 2017, 16:31:12 pm »
"- neither category nor manufacturer were inherited"
How do you know?
I know it because the child product does not appear in the front end under the category. It only appears there when I manually assign the category to the child product.
Joomla 3.6.5 , VirtueMart 3.2.1

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2101
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Custom fields again
« Reply #10 on: February 27, 2017, 16:44:16 pm »
Category get never inherited.
If you use parent as model, you have to set category in each child.
This is to have possibility to display, or not, child in the category.

David

  • Beginner
  • *
  • Posts: 38
Re: Custom fields again
« Reply #11 on: February 27, 2017, 16:51:36 pm »
Category get never inherited.
If you use parent as model, you have to set category in each child.
This is to have possibility to display, or not, child in the category.

Then someone should correct the Virtuemart documentation: https://docs.virtuemart.net/manual/products-menu/product.html - because it says that "The only parameter that the child product does not inherit and must be unique is the slug/ alias."
Joomla 3.6.5 , VirtueMart 3.2.1