Author Topic: Show me specific custom field list, when i select another custom filed...  (Read 669 times)

Alexikakos

  • Beginner
  • *
  • Posts: 12
hi all,
I have virtuemart (v3.4.2) shop which sell cars.

I have 4 customs fields:
1. manufacture (in costum field, not virtuemart manufacture. It is String type and list, so in add new product process, in backend you select from drop down list the manufacture)
2. model (String type and list with cars model)
3. cc
4. year

I am try to find a way, in backend, when i add a new product and i choose, in custom field manufacture "BMW", in model drop down list to show me only BMW models. Not from other manufacture.

ps i use "vm custom Filters PRO" for filtering the results.

Any idea??? :P

herbertvwright

  • Beginner
  • *
  • Posts: 1
  • A beginner
    • Buy Fake Id online
tHAT IS ALSO WHAT I AM LOOKING FOR  :)

Δήμητρα Ροδοστόγλου

  • Beginner
  • *
  • Posts: 5
  • A beginner
Hello,
I have the same problem. I've been searching for a solution but i have found nothing.

I am also using the custom fields PRO plugin. Is there any other plugin that can help?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3955
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
You can certainly verify if manufacturer is selected and hide or nor render the second list using javascript or php if the list is not dynamic rendered using ajax.

Alexikakos

  • Beginner
  • *
  • Posts: 12
I created a custom field (string - list) for every car brand and in list i have assign all model of specific brand , separating with ( ; ). The name of custom field, for brand models, is the same with manufacturer. eg i have a custom field named "BMW" and inside i have in list all BMW models. (same name for vm manufacturer and model custom field)

Remember i have also custom fields "year" and "cc", which are used in every product - car.

I try to find a solution (i suppose java) which when i select from virtuemart  manufacturer "BMW" in custom filed area, i want to appear custom field "BMW", "cc", "year". if a select from vm manufacturer "Fiat"  i want to appear custom field "Fiat", "cc", "year".

i just dont know how...

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3955
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
I have understand the problem. This need to modify the PHP or Javascript.
I dont know exactly the code of vm custom Filters PRO, so i cannot write the code without access to the site and some time to develop it.
PM me or use any contatct form in my website, if you dont find a solution, so i can do the Job.

Δήμητρα Ροδοστόγλου

  • Beginner
  • *
  • Posts: 5
  • A beginner
Could we possibly have all the custom fields appear in the Add Product page (without clicking on each custom field) and then, when the user adds a Manufacturer, only the Manufacturers model will remain open (the rest will be hidden) using some javascript.

E.g.
I am creating a new product that is Fiat (manufacturer),  Punto (model - custom field) and 2001(year-custom field). So, when the page opens, all the custom fields are open (models and years, including BMW and Toyota models).  When I enter the manufacturer (Fiat), the custom fields Year and Fiat Models remain visible while the rest hide.

Is there a way we could do this?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3955
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Could we possibly have all the custom fields appear in the Add Product page (without clicking on each custom field) and then, when the user adds a Manufacturer, only the Manufacturers model will remain open (the rest will be hidden) using some javascript.

E.g.
I am creating a new product that is Fiat (manufacturer),  Punto (model - custom field) and 2001(year-custom field). So, when the page opens, all the custom fields are open (models and years, including BMW and Toyota models).  When I enter the manufacturer (Fiat), the custom fields Year and Fiat Models remain visible while the rest hide.

Is there a way we could do this?
Certainly, but this need some custom code. I cannot answer you with a generic solution.