Can't have more than 1 drop down field???

More
10 years 2 days ago #22525 by blink
Sorry let me rephrase:

I have multiple dropdown fields on your form - in the backend of Virtuemart i made these custom fields cart variants and NOT VMdropdown because I dont think it works when i select that.


Now when I use more than one drop down when populating the database, only the FIRST drop down record is saved for the product.


Another issue I found was, if I had say an int or string field after 2 drop down fields (or cart variants)

the second drop down field would save the int/string input instead of its select values.

Please let me know if I can help more, or if you would like my login details =]

Mike

Please Log in or Create an account to join the conversation.

More
10 years 1 day ago - 10 years 1 day ago #22536 by nordmograph
OK I just add multiple dorpdown fields to the demo site
3 using vmdropdown plugin , working fine
2 using the cart variant list field

As you descirbe , only the irst one is take into consideartion.
I have to investigate now, but at first sight it seems these incrimenated fields are not name correctly:
corecustomfield_1 for the first field wich is ok
corecustomfield_3 for the seconf field wich is wrong.

Is it your case too ? or can you post a link to your form ?

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.
Last edit: 10 years 1 day ago by nordmograph.

Please Log in or Create an account to join the conversation.

More
10 years 1 day ago - 10 years 1 day ago #22537 by nordmograph
Ok I found the issue
open
components/com_vmvendor/views/addproduct/tmpl/default.php
Replace
Code:
for($i = 0; $i<count($exploded_cartvar);$i++){ echo '<option value="'.$exploded_cartvar[$i].'">'.$exploded_cartvar[$i].'</option>';

With
Code:
for($j = 0; $j<count($exploded_cartvar);$j++){ echo '<option value="'.$exploded_cartvar[$j].'">'.$exploded_cartvar[$j].'</option>';

Let me know.
I guess, this will have to be applyed to editproduct view too.

in
components/com_vmvendor/views/editproduct/tmpl/default.php
Replace
Code:
for($i = 0; $i<count($exploded_cartvar);$i++){ echo '<option value="'.$exploded_cartvar[$i].'"'; if($exploded_cartvar[$i] == $core_custom_field->value) echo ' selected '; echo '>'.$exploded_cartvar[$i].'</option>';

With
Code:
for($j = 0; $j<count($exploded_cartvar);$j++){ echo '<option value="'.$exploded_cartvar[$j].'"'; if($exploded_cartvar[$j] == $core_custom_field->value) echo ' selected '; echo '>'.$exploded_cartvar[$j].'</option>';

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.
Last edit: 10 years 1 day ago by nordmograph.

Please Log in or Create an account to join the conversation.

Time to create page: 0.317 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.