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

SteP[IT]

  • Jr. Member
  • **
  • Posts: 198
  • 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.5 - VM 3.2.6

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

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2752
  • VirtueMart Version: 3.2.15
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.8
php 7.0

SteP[IT]

  • Jr. Member
  • **
  • Posts: 198
  • 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 #32 on: February 18, 2018, 17:53:17 pm »
I have sorted it, having spare time to do it.
I have made a simple change, and now you can specify if output has to be rendered as radio, giving the expected radio buttonlist  instead of the original dropdown one.
Are you interested to share with others my mod?

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.

J 3.8.5 - VM 3.2.6

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

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2752
  • VirtueMart Version: 3.2.15
Re: Simple VM3 Product Cart Variant Custom Field / Attribute Plugin [ FREE ]
« Reply #33 on: February 18, 2018, 19:15:54 pm »
StepIT

Great you got it working  :)

By all means share what you have done and I can consider if I will add it to base code.

Radios are unusual in the context of options - but if you only have a few it could be good to show as a radio option.
regards
A

Joomla 3.8.8
php 7.0

SteP[IT]

  • Jr. Member
  • **
  • Posts: 198
  • 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 #34 on: February 18, 2018, 19:30:44 pm »
Attached here the file I have changed, you can sort the changes by comparing them with originals.
I found this useful when using few field values, allowing you to have a better global view in mobile viewport.
You have also to add the new admin strings to the .ini language file.

btw, you can see it working here:
https://www.toolware.it/it/prodotti-per-categoria/recupero-posta-elettronica/stellar-ost-to-pst-converter/stellar-phoenix-ost-to-pst-converter
J 3.8.5 - VM 3.2.6

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

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2752
  • VirtueMart Version: 3.2.15
Re: Simple VM3 Product Cart Variant Custom Field / Attribute Plugin [ FREE ]
« Reply #35 on: February 23, 2018, 16:50:46 pm »
StepIT

Nice implementation - looks good

I will take a look and see what I can do with the code you have kindly provided.   :)
regards
A

Joomla 3.8.8
php 7.0

1Jumpman

  • Beginner
  • *
  • Posts: 8
Is posibility to add multipy (*) to final product price (total summ of all customs fields choosed)  not multiply to Standard sales price? I need to add 133% to final price of product with some cf.

Regards
Michal

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2752
  • VirtueMart Version: 3.2.15
The qvariant does not have this capability
regards
A

Joomla 3.8.8
php 7.0

1Jumpman

  • Beginner
  • *
  • Posts: 8
Ok. It's clear. But you know how to make some modification? Changing Standard Pirce to final price?

Thenks for help
Michal

m.davide82

  • Jr. Member
  • **
  • Posts: 115
Hello,

I have 2 questions:

- How do I remove the price in the dropdown?
- How do I change the price in the dropdown with the total (included baseprice)?


Thanks,
Davide

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2752
  • VirtueMart Version: 3.2.15
Create a template override for default.php
regards
A

Joomla 3.8.8
php 7.0

zifou57

  • Beginner
  • *
  • Posts: 3
Hi all,

We install this plugin today, but for many prices, we have a price override, and we want to apply the reduction to the price without tax.

With this plugin is possible ??

Thank you.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2752
  • VirtueMart Version: 3.2.15
The price override - is exactly what it says - it overrides all other prices.

So no, you cannot use this plugin
regards
A

Joomla 3.8.8
php 7.0

atlantis05

  • Beginner
  • *
  • Posts: 1
  • A beginner
Hello "AH"

I've been reading the thread of the forum and everything is pretty well explained, but I can not get the @ multiply me by the amount agreed.

Attached image with the images and settings

Thank you

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2752
  • VirtueMart Version: 3.2.15
I configured the variant using euros

Multiply should not show ANY value as it is simply a multiple of the single item price.

In your Product customfield you look like you have spaces there should be no spaces in the master nor the product variant options:-

1m,2m@*2,3m@*3,4m@*4,5m@*5

There should be NO spaces  - a space will give you the problem you have.

In addition "Plug-ins  porcentaje" should be 0 not 10.00000

You can remove these spaces - or try the new version 5.1 now available in post 1
regards
A

Joomla 3.8.8
php 7.0