Author Topic: Hide parent product from class="product-field-display"  (Read 2110 times)

marvays

  • Jr. Member
  • **
  • Posts: 327
    • richta.cz
  • Skype Name: marvays
Hide parent product from class="product-field-display"
« on: December 16, 2019, 09:09:59 am »
Hello. I'm solving a problem.
I have a parent and a child.
In the drop-down list I have "Choose a variant" in the first place.
When I expand the list, I see "select a variant" on the first line again and then the product variants.

Can I disable the "select variant" display in the drop-down list in VM settings? When I select a varinate, this field may no longer display. Make it perfect.

I solved it in css:
Code: [Select]
.product-field-display option:first-of-type {
    display: none;
}

But it should be automatic.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Hide parent product from class="product-field-display"
« Reply #1 on: December 16, 2019, 10:01:57 am »
Great :)

Why do You do it? I need first line - the first line tell customer - Please, select  child (or material, or width, or another - in attachment == Vyberte materiál, Vyberte rozměr)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

marvays

  • Jr. Member
  • **
  • Posts: 327
    • richta.cz
  • Skype Name: marvays
Re: Hide parent product from class="product-field-display"
« Reply #2 on: December 16, 2019, 10:15:28 am »


This is unnecessary in the drop-down list and does not look good.
I'll say everything important then. In addition, the first position in the drop-down list is active and points to the parent. And I don't want to send the buyer to parents, but only to children.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Hide parent product from class="product-field-display"
« Reply #3 on: December 16, 2019, 13:22:14 pm »
Quote
And I don't want to send the buyer to parents, but only to children.

Hmm, our client considers it a mistake and want to send buyer to parents - if customer create mistake, then can't go back from selected child to parent (only in button in browser) :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

marvays

  • Jr. Member
  • **
  • Posts: 327
    • richta.cz
  • Skype Name: marvays
Re: Hide parent product from class="product-field-display"
« Reply #4 on: December 16, 2019, 14:04:59 pm »
Nenapadá mě jediný důvod, proč by měl být zákazník přesměrován na rodiče.