Author Topic: Standard attributes and Custome attribute hack...  (Read 3969 times)

imtiaz

  • Beginner
  • *
  • Posts: 25
    • Salt  lamps
Standard attributes and Custome attribute hack...
« on: January 23, 2011, 12:36:50 pm »
Hi , i want hack to hide standard or custom attributes , for example, i have online shop selling products  standard size( Large ,Medium and samll) we also offer custom, size, but custom size field visible . We want to hide default, if some one choose Custom size then it visible... any solution plz....

imtiaz

  • Beginner
  • *
  • Posts: 25
    • Salt  lamps
Re: Standard attributes and Custome attribute hack...
« Reply #1 on: January 23, 2011, 21:54:01 pm »
Any body help please , any solution...

zorkhh

  • Advanced
  • Jr. Member
  • *****
  • Posts: 245
    • vm-expert.com
Re: Standard attributes and Custome attribute hack...
« Reply #2 on: January 23, 2011, 22:05:27 pm »
From your description i don't really understand what you want to do - but i think (from what i understand) that you have to code this with Javascript in your theme.

You can add Javascript to the elements (dropdowns ...). With this it is possible to show and hide other elements.
Virtuemart Professional Support at http://www.vm-expert.com

Visit the large Virtuemart Group on Joomla.org: http://people.joomla.org/groups/viewgroup/30-Virtuemart.html

imtiaz

  • Beginner
  • *
  • Posts: 25
    • Salt  lamps
Re: Standard attributes and Custome attribute hack...
« Reply #3 on: January 23, 2011, 22:12:30 pm »
Hi Zorkh Thanks for your  reply ,

look this link
http://www.etaajir.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=51&category_id=35&option=com_virtuemart&Itemid=29

Now my Question is  If you see standard size attribute  size of product (e.g Medium ) and custom attributes fields also visible. i want when standard attribute size visible these cutome fields hide and when  i select cutome size from drop down list of standard attributes then these custom attribute visible hope you understand now , sorry for bad englih...

zorkhh

  • Advanced
  • Jr. Member
  • *****
  • Posts: 245
    • vm-expert.com
Re: Standard attributes and Custome attribute hack...
« Reply #4 on: January 24, 2011, 09:53:13 am »
That's what i understood from your first post ;-)

You should add a DIV around the size-textfields that is set to "display:none;" (=invisible). Then add a javascript onchange-event to the dropdown "Size_field" that checks the value of the dropdown and toggles the visibility of the DIV (visible when the value is "custom_size"). This can be done completely in the theme files - so no "hack" needed.

Thomas
Virtuemart Professional Support at http://www.vm-expert.com

Visit the large Virtuemart Group on Joomla.org: http://people.joomla.org/groups/viewgroup/30-Virtuemart.html

imtiaz

  • Beginner
  • *
  • Posts: 25
    • Salt  lamps
Re: Standard attributes and Custome attribute hack...
« Reply #5 on: January 24, 2011, 10:02:35 am »
sorry zorkhh i am new , not know well about coding and where and in which file, can you help me and send me code where i just copy and paste....

Thanks for  your  reply and care

zorkhh

  • Advanced
  • Jr. Member
  • *****
  • Posts: 245
    • vm-expert.com
Re: Standard attributes and Custome attribute hack...
« Reply #6 on: January 24, 2011, 11:08:30 am »
Unfortunately not.

1. this has to be done in different files of the theme
2. it depends a bit on your template JS and other things on your site how to implement this (i didn't check this yet)
3. (and most important) normally i get paid for things like this. It is my opinion that it is more than enough to show HOW things can be done as detailed as possible and often with code in the forum for free - but not creating individual solutions

Thomas
Virtuemart Professional Support at http://www.vm-expert.com

Visit the large Virtuemart Group on Joomla.org: http://people.joomla.org/groups/viewgroup/30-Virtuemart.html

imtiaz

  • Beginner
  • *
  • Posts: 25
    • Salt  lamps
Re: Standard attributes and Custome attribute hack...
« Reply #7 on: January 24, 2011, 21:53:48 pm »
Hi ,after long effort i have done what i need... I am uploading file for those people who dont pay or know about it.. just replace one file and enjoy...

components/com_virtuemart/themes/yourtemplate/templates/product_details/includes

>> replace file ( addtocart_drop.tpl.php )


[attachment cleanup by admin]

zorkhh

  • Advanced
  • Jr. Member
  • *****
  • Posts: 245
    • vm-expert.com
Re: Standard attributes and Custome attribute hack...
« Reply #8 on: January 25, 2011, 12:40:00 pm »
Cool! Congratulations!

I'm happy that you solved it. (... and i really mean it!)

Thomas
Virtuemart Professional Support at http://www.vm-expert.com

Visit the large Virtuemart Group on Joomla.org: http://people.joomla.org/groups/viewgroup/30-Virtuemart.html

imtiaz

  • Beginner
  • *
  • Posts: 25
    • Salt  lamps
Re: Standard attributes and Custome attribute hack...
« Reply #9 on: January 25, 2011, 19:16:49 pm »
Here some changes in my previous file, Previous upload have one bug so i fixed now

Remember if you want to use custom attribute for size , must enter word ( Custom size ) in drop down menu ( Standard attributes). Once your customer select This custom size option then drop down custom attributes visible.

ali

[attachment cleanup by admin]

useris

  • Jr. Member
  • **
  • Posts: 224
Re: Standard attributes and Custome attribute hack...
« Reply #10 on: November 08, 2011, 22:18:48 pm »
This great hack :) Would be very nice to have something similar with radio buttons