Author Topic: Not possible to add new ramifications for Multivariants  (Read 3639 times)

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Not possible to add new ramifications for Multivariants
« on: May 12, 2015, 13:29:49 pm »
vm 3.0.8 and joomla 3.4.1

Hi

Was testing multi variants for first time while checking the demo also.

The button "new" is not working for new ramifications. Works perfectly in the demo but not in joomla 3.4.1 at least for me,

Regards

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4341
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Not possible to add new ramifications for Multivariants
« Reply #1 on: May 12, 2015, 14:56:20 pm »
No javascript bug in browser console?

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Not possible to add new ramifications for Multivariants
« Reply #2 on: May 12, 2015, 15:39:44 pm »
Console says 1 error in that page, don't know if this is the one related:

SyntaxError: expected expression, got end of script
index.p...t_id=69 (línea 1, col 79)
GET http://website.com/administrator/index.php?o...virtuemart_product_id=69&type=fields&id=32&row=0
   
200 OK
      420ms   
jquery.min.js (línea 4)
ParámetrosEncabezadosRespuestaJSONCookies
Code: [Select]
{"table":"customPlugins","value":["\n\t\t\t\t\t<tr class=\"removable\">\n\t\t\t\t\t\t<td>\n\t\t\t\t\t
\t\t<b>Multi variantes<\/b> Multi Variante<\/span><br\/>\n\n\t\t\t\t\t\t\t\t<span class=\"vmicon vmicon-16-default-off
\"><\/span>\n\t\t\t\t\t\t\t\t<span class=\"vmicon vmicon-16-move\"><\/span>\n\t\t\t\t\t\t\t\t<span class
=\"vmicon vmicon-16-remove\"><\/span>\n\n\t\t\t\t\t\t\n\t\t\t<input type=\"hidden\" value=\"C\" name
=\"field[0][field_type]\" \/>\n\t\t\t<input type=\"hidden\" value=\"\" name=\"field[0][custom_element
]\" \/>\n\t\t\t<input type=\"hidden\" value=\"0\" name=\"field[0][custom_jplugin_id]\" \/>\n\t\t\t<input
 type=\"hidden\" value=\"32\" name=\"field[0][virtuemart_custom_id]\" \/>\n\t\t\t<input type=\"hidden
\" value=\"69\" name=\"field[0][virtuemart_product_id]\" \/>\n\t\t\t<input type=\"hidden\" value=\"0
\" name=\"field[0][virtuemart_customfield_id]\" \/><input class=\"ordering\" type=\"hidden\" value=\"0
\" name=\"field[0][ordering]\" \/>\n\t\t\t\t\t \t<\/td>\n\t\t\t\t\t\t\t<td colspan=\"2\" ><div style
=\"float:left\"><select id=\"selectoptions0\" name=\"field[0][selectoptions][0][voption]\">\n\t<option
 value=\"0\">Por favor seleccione<\/option>\n\t<option value=\"product_name\" selected=\"selected\">Nombre
 del producto<\/option>\n\t<option value=\"product_sku\">Ref. del producto<\/option>\n\t<option value
=\"slug\">Alias de Producto<\/option>\n\t<option value=\"product_length\">Longitud de producto<\/option
>\n\t<option value=\"product_width\">Ancho del producto<\/option>\n\t<option value=\"product_height\"
>Altura de producto<\/option>\n\t<option value=\"product_weight\">Peso del producto<\/option>\n\t<option
 value=\"clabels\">Usar etiqueta personalizada<\/option>\n<\/select>\n<input type=\"text\" value=\"\"
 name=\"field[0][selectoptions][0][clabel]\" style=\"line-height:2em;margin:5px 5px 0;\" \/><textarea
 name=\"field[0][selectoptions][0][values]\" rows=\"5\" cols=\"35\" style=\"float:none;margin:5px 5px
 0;\" >Naranjas de zumo Baby 10 kg<\/textarea><\/div><div style=\"float:right;max-width:60%;width:45
%;min-width:30%\" >Esto es Multi variantes. Puede crear hasta 5 ramificaciones. Cada l\u00ednea es una
 nueva variante. En caso de que haya seleccionado un atributo que existe para el producto, a continuaci
\u00f3n, todas las variantes diferentes de los derivados se enumeran directamente. As\u00ed que en caso
 de que intente eliminar una variante utilizada, se a\u00f1ade al final de la lista. <\/br> Los valores
 que se muestran en los desplegables son almacenados directamente como valores para el producto.<\/br
> Si utiliza unidades dimensionales, recuerde que las opciones deben tener los mismos decimales que sus
 valores almacenados, por ejemplo 40.0000. Puede introducir un n\u00famero en la etiqueta de campo personalizada
 para redondear en pantalla.<\/div><div class=\"clear\"><\/div><fieldset style=\"background-color:#F9F9F9
;\">\n\t\t\t\t\t<legend>Nueva ramificaci\u00f3n<\/legend>\n\t\t\t\t\t<div id=\"new_ramification\"><select
 id=\"voption\" name=\"voption\">\n\t<option value=\"0\">Por favor seleccione<\/option>\n\t<option value
=\"product_name\" selected=\"selected\">Nombre del producto<\/option>\n\t<option value=\"product_sku
\">Ref. del producto<\/option>\n\t<option value=\"slug\">Alias de Producto<\/option>\n\t<option value
=\"product_length\">Longitud de producto<\/option>\n\t<option value=\"product_width\">Ancho del producto
<\/option>\n\t<option value=\"product_height\">Altura de producto<\/option>\n\t<option value=\"product_weight
\">Peso del producto<\/option>\n\t<option value=\"clabels\">Usar etiqueta personalizada<\/option>\n<
\/select>\n<input type=\"text\" value=\"\" id=\"vlabel\" name=\"vlabel\" \/><span id=\"new_ramification_bt
\"><span class=\"icon-nofloat vmicon vmicon-16-new\"><\/span>Nuevo<\/span>\n\t\t\t\t\t<\/div>\n\t\t\t
\t<\/fieldset><div class=\"button2-left  btn-wrapper\">\n\t\t\t\t\t\t<div class=\"blank\"><a href=\"
\/administrator\/index.php?option=com_virtuemart&amp;view=product&amp;task=createChild&amp;virtuemart_product_id
=69&amp;a827a6d2e581086473e93aa7412a42df=1&amp;target=parent\" class=\"btn btn-small\">A\u00f1adir producto
 derivado<\/a><\/div>\n\t\t\t\t\t<\/div><div class=\"clear\"><\/div><table id=\"syncro\"><tr>\n<th style
=\"text-align: left !important;width:130px;\">#<\/th><th style=\"text-align: left !important;width:90px
;\">Ref. del producto<\/th><th style=\"text-align: left !important;width:80px;\">GTIN (EAN,ISBN)<\/th
>\n<th style=\"text-align: left !important;\" width=\"5%\">Precio de coste<\/th>\n<th style=\"text-align
: left !important;width:30px;\">En Stock<\/th>\n<th style=\"text-align: left !important;width:30px;\"
>Reservado, pedido<\/th><th>Nombre de producto<\/th><\/tr><tr class=\"row1\"><td><a href=\"\/administrator
\/index.php?option=com_virtuemart&amp;view=product&amp;task=edit&amp;virtuemart_product_id=69\" title
=\"Editar naranjas-de-zumo-baby-10-kg\">69->69 naranjas-de-zumo-baby-10-kg<\/a><\/td><td><input readonly
=\"readonly\" class=\"readonly\" type=\"text\" name=\"childs[69][product_sku]\" id=\"child69product_sku
\" size=\"20\" maxlength=\"64\" value=\"narbaby\" \/><\/td><td><input readonly=\"readonly\" class=\"readonly
\" type=\"text\" name=\"childs[69][product_gtin]\" id=\"child69product_gtin\" size=\"13\" maxlength=
\"13\" value=\"\" \/><\/td><td><input readonly=\"readonly\" class=\"readonly\" type=\"text\" name=\"childs
[69][mprices][product_price][]\" size=\"8\" value=\"4.807690\" \/>\n\t\t<input type=\"hidden\" name=
\"childs[69][mprices][virtuemart_product_price_id][]\" value=\"65\"  ><\/td><td>2147483471<\/td><td>44
<\/td><td><select id=\"cvard.69s0\" name=\"childs[69][product_name]\" class=\"cvard\">\n\t<option value
=\"0\">Por favor seleccione<\/option>\n\t<option value=\"Naranjas de zumo Baby 10 kg\" selected=\"selected
\">Naranjas de zumo Baby 10 kg<\/option>\n<\/select>\n<input type=\"hidden\" name=\"field[0][options
][69][0]\" value=\"Naranjas de zumo Baby 10 kg\" \/><\/td><\/tr><tr class=\"row0\"><td><a href=\"\/administrator
\/index.php?option=com_virtuemart&amp;view=product&amp;task=edit&amp;virtuemart_product_id=181\" title
=\"Editar naranjas-de-zumo-baby-10-kg-1\">69->181 naranjas-de-zumo-baby-10-kg-1<\/a><\/td><td><input
  class=\"inputbox\" type=\"text\" name=\"childs[181][product_sku]\" id=\"child181product_sku\" size
=\"20\" maxlength=\"64\" value=\"\" \/><\/td><td><input  class=\"inputbox\" type=\"text\" name=\"childs
[181][product_gtin]\" id=\"child181product_gtin\" size=\"13\" maxlength=\"13\" value=\"\" \/><\/td><td
><input  class=\"inputbox\" type=\"text\" name=\"childs[181][mprices][product_price][]\" size=\"8\" value
=\"\" \/>\n\t\t<input type=\"hidden\" name=\"childs[181][mprices][virtuemart_product_price_id][]\" value
=\"0\"  ><\/td><td>0<\/td><td>0<\/td><td><select id=\"cvard.181s0\" name=\"childs[181][product_name]
\" class=\"cvard\">\n\t<option value=\"0\">Por favor seleccione<\/option>\n\t<option value=\"Naranjas
 de zumo Baby 10 kg\" selected=\"selected\">Naranjas de zumo Baby 10 kg<\/option>\n<\/select>\n<input
 type=\"hidden\" name=\"field[0][options][181][0]\" value=\"Naranjas de zumo Baby 10 kg\" \/><\/td><
\/tr><\/table><\/td>\n\t\t\t\t\t\t <\/tr>\n\t\t\t\t\t<\/tr>"],"ok":1}

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4341
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Not possible to add new ramifications for Multivariants
« Reply #3 on: May 12, 2015, 17:23:25 pm »
The script is not corretly inserted the first time you use multi variant.
YOu have to save the product, then you can add new ramification after.

THis is because:
Code: [Select]
<script id="new_ramification_js" type="text/javascript">//<![CDATA[
jQuery( function($) {
$('#new_ramification_bt').click(function() {
var Prod = $('.new_ramification');//obsolete?

var voption = jQuery('#voption').val();
var label = jQuery('#vlabel').val();
//console.log ('my label '+label);
form = document.getElementById('adminForm');
var newdiv = document.createElement('div');
newdiv.innerHTML = '<input type="text" value="'+voption+'" name="field[0][selectoptions][1][voption]" /><input type="text" value="'+label+'" name="field[0][selectoptions][1][clabel]" />';
form.appendChild(newdiv);

form.task.value = 'apply';
form.submit();
return false;
});
}); //]]>
</script>

jQuery( function($) { is not needed here and using it so shoud work, but is you now only max can update this.
Code: [Select]
<script id="new_ramification_js" type="text/javascript">//<![CDATA[
$('#new_ramification_bt').click(function() {
var Prod = $('.new_ramification');//obsolete?

var voption = jQuery('#voption').val();
var label = jQuery('#vlabel').val();
//console.log ('my label '+label);
form = document.getElementById('adminForm');
var newdiv = document.createElement('div');
newdiv.innerHTML = '<input type="text" value="'+voption+'" name="field[0][selectoptions][1][voption]" /><input type="text" value="'+label+'" name="field[0][selectoptions][1][clabel]" />';
form.appendChild(newdiv);

form.task.value = 'apply';
form.submit();
return false;
});
 //]]>
</script>

I don't have tested it, but in all case currently script cannot work

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Not possible to add new ramifications for Multivariants
« Reply #4 on: May 13, 2015, 12:59:41 pm »
We don't really need Multivariants, was just testing them, but good to know there seems to be a little conflict there...

crn

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: Not possible to add new ramifications for Multivariants
« Reply #5 on: June 24, 2015, 17:20:01 pm »
I DO need multivariants...has anyone had any success with this feature?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Not possible to add new ramifications for Multivariants
« Reply #6 on: June 24, 2015, 20:01:24 pm »
yes a lot, the post is very old. We have vm3.0.9.4 now
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

crn

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: Not possible to add new ramifications for Multivariants
« Reply #7 on: June 24, 2015, 21:19:55 pm »
I am using VirtueMart 3.0.6.2.  Is there any type of updated procedure for creating multivariant products with the new release?  I create the custom field, add ramifications and only blank drop downs appear.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27767
  • Always on vacation
    • Jenkin Hill Internet
Re: Not possible to add new ramifications for Multivariants
« Reply #8 on: June 24, 2015, 23:49:10 pm »
@crn you should be using a least VM3.0.8 now http://virtuemart.net/news/latest-news/469-security-release-vm3-0-8  (there are reasons why updates are released).

Current latest is VM3.0.9.4  available on http://dev.virtuemart.net/projects/virtuemart/files
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.8.4.10335 on Joomla 3.9.19 PHP 7.3.18

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Not possible to add new ramifications for Multivariants
« Reply #9 on: October 03, 2015, 05:51:34 am »
Just to let you know, this still happens in vm 3.0.10 the button "new" in multivariants is not working for new ramifications.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Not possible to add new ramifications for Multivariants
« Reply #10 on: October 04, 2015, 21:38:09 pm »
I am sure it works on our demo.virtuemart.net
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Not possible to add new ramifications for Multivariants
« Reply #11 on: October 06, 2015, 02:55:10 am »
I am sure it works on our demo.virtuemart.net

Yes it works in the demo for joomla 2.5 it doesnt work in joomla 3.4.4

Would be nice if you guys updated the demo to 3.5 series, 2.5 doesn't act the same in many features.


Regards

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Not possible to add new ramifications for Multivariants
« Reply #12 on: October 09, 2015, 08:51:11 am »
Maybe the reason is simpler: http://docs.virtuemart.net/tutorials/product-creation/221-multivariant.html

"Remind to store the product always, after adding new rambifications."
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

stawebnice

  • Jr. Member
  • **
  • Posts: 241
  • What does not kill you, makes you stronger...
    • StaWEBnice - www stránky, seo optimalizace a copywriting
  • Skype Name: peta_ze_sklepa
  • VirtueMart Version: 3.2.14
Re: Not possible to add new ramifications for Multivariants
« Reply #13 on: February 07, 2016, 00:27:41 am »
Hi Max,

I finally got to creating the video tutorial how to use multivariant with virtuemart 3.0.12. I know I promissed it  long time ago :)
The video is with Czech commentary, but the backend is in English, so everybody can see how to set it up and use it.

http://www.stawebnice.com/virtuemart-3-video-navod-pouziti-multivarianty

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Not possible to add new ramifications for Multivariants
« Reply #14 on: February 07, 2016, 15:26:56 pm »
Nice, :-)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/