Author Topic: Simple VM3 Product Cart Variant Custom Field / Attribute Plugin [ FREE ]  (Read 57974 times)

SteP[IT]

  • Jr. Member
  • **
  • Posts: 196
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.2.6
Re: Simple VM3 Product Cart Variant Custom Field / Attribute Plugin [ FREE ]
« Reply #30 on: February 11, 2018, 11:49:30 am »
I can't find where I'm wrong.
I have set this in default.php to get different API outputs:
Code: [Select]
$html = JHTML::_('select.genericlist', $selects,'customProductData['.$product->virtuemart_product_id.']['.$params->virtuemart_custom_id.']['.$params->virtuemart_customfield_id .'][custom_qvariant]','class=customqvariant','value','text',$selects[0],false,true);
$html .= JHTML::_('select.radiolist', $selects, 'customProductData['.$product->virtuemart_product_id.']['.$params->virtuemart_custom_id.']['.$params->virtuemart_customfield_id .'][custom_qvariant]',false,'value','text',$selects[0],false,true);
$html .= JHTML::_('select.suggestionlist', $selects, 'value','text',$selects[0],false,true);

The only one not working is the radiolist, this is the html I'm getting:
Code: [Select]
<span class="product-field-display">
<select id="customProductData11902412105custom_qvariant" name="customProductData[1190][24][12105][custom_qvariant]" class=customqvariant>
<option value="1" selected="selected">1</option>
<option value="2">2</option>
</select>
<div class="controls">
<label for="customProductData[1190][24][12105][custom_qvariant]" id="customProductData[1190][24][12105][custom_qvariant]-lbl" class="radio">

<input type="radio" name="customProductData[1190][24][12105][custom_qvariant]" id="customProductData[1190][24][12105][custom_qvariant]" value=""  />
</label>
<label for="customProductData[1190][24][12105][custom_qvariant]" id="customProductData[1190][24][12105][custom_qvariant]-lbl" class="radio">

<input type="radio" name="customProductData[1190][24][12105][custom_qvariant]" id="customProductData[1190][24][12105][custom_qvariant]" value=""  />
</label>
</div>
<datalist id="Array">
<option value="1">1</option>
<option value="2">2</option>
</datalist>
</span>

I shows that also datalist data are correctly generated, but not the radiolist ones.
Any hint?
Thank you in advance.
J 3.8.2 - VM 3.2.6

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2674
  • VirtueMart Version: 3.2.8
Re: Simple VM3 Product Cart Variant Custom Field / Attribute Plugin [ FREE ]
« Reply #31 on: February 11, 2018, 15:01:30 pm »
Radiolist should be what you are aiming to create.

If you cannot get it to work with a radiolist you may need to look at the data being created prior to the display.

I do not provide support or development for the plugin - it was created to meet my needs and the needs of another forum member.



regards
A

Joomla 3.8.3
php 5.6 + php 7