VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: cas on January 25, 2012, 07:25:36 AM

Title: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on January 25, 2012, 07:25:36 AM
I just upgraded to VM2.0.1 from VM2.0.0, and my previously defined Custom Fields of type Cart Variant are no longer valid and needed to be deleted.  Fortunately I didn't have too many defined.  I then defined a new Custom Fields of type String and added it to the product, but on the website they are now displayed as radio buttons.  When they were of type Cart Variant in VM2.0.0 they displayed in a dropdown on the website.  How do I get Custom Fields to display as a dropdown using the new types?   
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 04, 2012, 21:40:41 PM
Fixed in VM 2.0.1.d.  Thanks.
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 10:59:01 AM
Same for me... using 2.0.0 with Joomla 1.7. NO dropdowns appearing. I don;t see the 2.0.1b... where/how can I download it?... I have to be able to create simple dropdowns....

Thanks
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 19:51:51 PM
In VM 2.0.0 there are dropdowns.  It was a problem in early versions of VM 2.0.1.  In VM 2.0.0 did you define the custom fields as type Cart Variant? 
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 20:48:30 PM
Yes... and I can then assign them within the product, but I'm unable yo add multiple  choices in the same dropdown. I end up with one dropdown, but can;'t add additional variations/attributes to it. Can you be specific, or send me to a tutorial?

tx
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 20:59:54 PM
Okay, so now you have the dropdown working, but you want to do multiple selections within the same dropdown?  If so, I'll need to let the VM folks reply on how to do that.  My website didn't need multiple select dropdowns. 
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 21:07:55 PM
Thanks. But a dropdown with only one variant, isn't a dropdown, is it?

This is amazing to me. A simple drop down menu for product attributes, and I've spent hours with no success, and a bunch of running around on versions, bugs, etc. Still nothing

VirtueMart team... please.. what's the story here?

TX
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 21:25:03 PM
That's not what I asked.  It sounded like you wanted a multi-select dropdown.  That is different than a dropdown with multiple options to select one from.  So to get multiple entries in the same dropdown, you need to add multiple entries of the same Custom Field in the product custom fields editor.   So for example, you define a Custom Field of type Cart Variant and name it Size.  Then in the product editor, in the Custom Fields tab, you pick the Size custom field 3 times, and then you name one of them Small, the second one Medium, and the third one name it Large.  Does this make sense now?
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 22:02:24 PM
Thanks... giving it a try. Do the.. Publish Admin, Is it a list, hidden, cart attribute radio button in the custom field setup matter?
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 22:07:51 PM
Here is how I have them set:
Published: yes
Parent: none set
Cart Attribute: yes
Admin only: no
Is a list?: no
Hidden: no
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 22:57:16 PM
You're awesome.

This should be posted BIG on their home page. Lots of folks frustrated. I'm having an issue with the pricing though... it's adding an amount from one of the dropdown items to the price of the item, doubling it. How so I keep this from happening.
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 23:05:54 PM
Thanks Greenhouse!  I just learned this stuff like you're doing now through trial & error, and a few nice forum folks who helped me.   

As far as the pricing, it all depends on what you have set in the Tax & Calculation Rules. 
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 23:12:39 PM
not charging any tax. All prices are the same... so the price is always $28.00... no matter what you choose from the drop down. If I take the prices out of the drop down field, it says "free" next to them.
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 23:14:59 PM
And now my quantity field says the same things as my drop down does. How come everyone brags about this product?... so much time spent on these simple things.
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 23:30:29 PM
You can change the "Free" to anything you want by doing a Joomla language override.  Look this feature up in Joomla... it works great to override labels without your changes getting overridden when you upgrade Joomla or the extensions such as VM. 
It's so easy... Just edit the file: your-root\language\overrides\en-GB.override.ini
Add the line: COM_VIRTUEMART_CART_PRICE_FREE="put whatever you want it to say here"
For me I made it blank "" so nothing displays when the price is 0. 

I also added this line in the override file to change the Joomla user profile plugin label 'Region' to 'State':
PLG_USER_PROFILE_FIELD_REGION_LABEL="State:"

This override feature is a great Joomla feature.
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 23:38:34 PM
Sounds great. Will try.

ARGH... I had this working. Now I go back in, and there is no field to enter the variable names, just a drop down that isn't there.
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 23:40:02 PM
I'm not sure about the other problem you noted with quantity and prices, but I feel your pain.  To my understanding version 2 is completely rewritten with lots of great new features, but until the bugs are worked out and there is good documentation, it will take some patience from us.  Let's remember they did this for free, so we owe them a great deal of thanks.  I'm confident things will get better soon. 
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Greenhouse on February 09, 2012, 23:48:48 PM
Thats awesome. Worked great. Thank you.

Is there a way to display the cart info everywhere on the site?, or does that require a component or plug-in?
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on February 09, 2012, 23:58:37 PM
Glad it worked!

To display the cart info on the site, you need to install the AIO and then go the Module Manager and use the VM Shopping Cart module. 
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: rvbgnu on March 13, 2012, 23:10:08 PM
Quote from: cas on February 09, 2012, 23:30:29 PM
You can change the "Free" to anything you want by doing a Joomla language override.  Look this feature up in Joomla... it works great to override labels without your changes getting overridden when you upgrade Joomla or the extensions such as VM. 
It's so easy... Just edit the file: your-root\language\overrides\en-GB.override.ini
Add the line: COM_VIRTUEMART_CART_PRICE_FREE="put whatever you want it to say here"
For me I made it blank "" so nothing displays when the price is 0. 

I also added this line in the override file to change the Joomla user profile plugin label 'Region' to 'State':
PLG_USER_PROFILE_FIELD_REGION_LABEL="State:"

This override feature is a great Joomla feature.


It's even better in Joomla 2.5, you don't need to edit the file. You can go directly to in joomla admin (back end) > Language Manager > Overrides, and enter what you want in the graphic User Interface. And awesome feature, probably a time saver: a search function to locate words and constant name.

A must have a look ;-)
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on March 13, 2012, 23:35:38 PM
Very cool.  Thanks!
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: kimbukhari on April 26, 2012, 14:39:17 PM
Dear cas,

I am using virtuemart 2.0.0 and as per your instruction searched for the .ini file what you have mentioned, but there is no such file in that folder. Only an index file is there, what to do? I am totally new to Joomla, please help me!

Regards,

Kim
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on April 26, 2012, 22:19:28 PM
Hi Kim,

You can create the .ini file in the overrides folder.   But even easier now with Joomla 2.5 is using the user interface in the admin to make overrides.  Just go to your Joomla admin > Language Manager > Overrides, and then enter whatever you want in the user interface.

Hope this helps,
Chuck
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: kimbukhari on April 27, 2012, 12:17:32 PM
Quote from: cas on April 26, 2012, 22:19:28 PM
Hi Kim,

You can create the .ini file in the overrides folder.   But even easier now with Joomla 2.5 is using the user interface in the admin to make overrides.  Just go to your Joomla admin > Language Manager > Overrides, and then enter whatever you want in the user interface.

Hope this helps,
Chuck

Dear Chuck,

Thanks for responding. basically, i would love to upgrade my site to 2.5 but there are some of the plugins which are right now not available for 2.5 what i am already using in it. Could you please help me about the code what need to be written in that ini file as i am a beginner to joomla. Plz!

Regards,

Kim
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on April 27, 2012, 18:33:08 PM
Hi Kim,

Here is what's in my en-GB.override.ini. The first 5 lines are just comments.  The last 2 lines are the actual overrides. 


; $Id: en-GB.override.ini 21509 2011-06-10 07:48:41Z infograf768 $
; Joomla! Project
; Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 NO BOM

PLG_USER_PROFILE_FIELD_REGION_LABEL="State:"
COM_VIRTUEMART_CART_PRICE_FREE=""
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: kimbukhari on April 28, 2012, 01:24:04 AM
Dear Chuck,

Thanks a lot. It really worked :)! You should also be given the title of "Hero Member :)"

Also, if i want to override / remove the field label "Price" and ": :" symbols which appear after it, what do i need to do more? Please advice. I would also need to know a couple of things more, if you dont mind :)

1- I need to fix a shipment cost against a product that if Product A is selected, Shipment rate A applied to the cart automatically
2- As there is a "standard payment" option available in virtuemart, i need to create / add a method (i.e. Western Union) into my cart. How to create it?

Please advice.

Thanks in advance

Kim
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: cas on April 28, 2012, 02:27:24 AM
Hi Kim,

I'm glad it worked!  As far as changing the label "Price" or any other label, you just need to find that label in the file en-GB.com_virtuemart.ini, or one of the other virtuemart language .ini files.  Once inside the right language file, then do a search for "Price" to get the label you want to change and then that entire line of code is what you put into the en-GB.override.ini.  It's that simple! 

For the other 2 questions about shipment and payment, I don't know the answer to those, sorry.  Try doing a search and if you cannot find the answer, post your question into a forum related to shipping and then one related to payment.   Good luck!

Cheers,
Chuck
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: deepeshchang on April 28, 2012, 19:01:15 PM
I guys i guess you need to hack some core files of virtuemart for this!

check this post!!

Enjoy!

http://network.convergenceservices.in/forum/46-virtue-mart/1238-steps-for-adding-attributes--custom-fields-in-virtue-mart-20--to-products.html
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: Sonictech on April 30, 2012, 19:10:56 PM
I was reading through this post and this is sort of what I was looking for regarding another post.  I am trying to set up a product that has multiple prices depending on the type that is needed.  There is no base price, just the price in the drop down list.  The question is:

1. How can you have the drop list with the custom cart variant field to show up with out having a base price?  I have attached a photo to this to explain what I am trying to do, thanks for any help!

Shawn

[attachment cleanup by admin]
Title: Re: VM2.0.1 - Custom Fields - How to display in dropdown?
Post by: kimbukhari on May 17, 2012, 21:08:54 PM
Dear Guys,

Could you please advice some way to sort the cart fields as i have tried to save these in order (in administration panel) but not showing as saved in order. What do i have to do?

Regards,

Kim