Forum HikaShop Bug Report Problem adding additional prices
Bienvenue, Invité
Nom d'utilisateur: Mot de passe: Se souvenir de moi

  • Page:
  • 1

SUJET: Problem adding additional prices

Problem adding additional prices il y a 2 ans 4 mois #5542

Version 1.4.3
Joomla 1.6

Hello, Im having issues adding prices to my products.
I can add a single product price "Qty=0"
When I try to add an additional price "Qty=6" it won't save.

Rgds
DM
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Problem adding additional prices il y a 2 ans 4 mois #5545

  • nicolas
  • Portrait de nicolas
  • En ligne
  • Messages: 30605
  • Remerciements reçus 2557
  • MODERATOR
Hi,

Could you try to reproduce the problem on our demo website ? Does it work for you there ?
Also, if you try with another browser, does it work ?

Do you have some kind of error ? What if you activate the debug mode of joomla and try again ? Do you get an error ?

As we can't reproduce the problem on our end, we will need more information in order to find the solution.

Thanks
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Problem adding additional prices il y a 2 ans 4 mois #5546

No error recorded!
Works on the demo version, note demo is J1.5 (IE)
Works on Firefox

Does not work on IE
Note the ID of the original price jumps to next available ID after the save button is hit.



Is this the JDebug error you are looking for?

**Parsing errors in language files**
/webspace/httpdocs/language/en-GB/en-GB.com_hikashop.ini : error(s) in line(s) 1, 626, 628, 661, 663
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Problem adding additional prices il y a 2 ans 4 mois #5547

  • nicolas
  • Portrait de nicolas
  • En ligne
  • Messages: 30605
  • Remerciements reçus 2557
  • MODERATOR
Hi,

Thank you for your report. That helped us reproduce the problem.

It seems to happen only with IE7 and not with IE8. It seems that IE7 doesn't initialize the DOM attributes of cloned elements unless they are appended to an element in the DOM. Thus, some data isn't properly initialized when you add a row. And thus, the row isn't taken into account.

In short, we changed the javascript function addPriceRow which handle that. You can edit the file administrator/components/com_hikashop/views/product/tmpl/price.php
and change the code:
function addPriceRow(){
	var count = parseInt(document.getElementById('count_price').value);
	document.getElementById('count_price').value=count+1;
	var theTable = document.getElementById('price_listing');
	var rowData = document.getElementById('price_##').cloneNode(true);
	rowData.id = rowData.id.replace(/##/g,count);
	for (var c = 0,m=rowData.cells.length;c<m;c++){
        rowData.cells[c].innerHTML = rowData.cells[c].innerHTML.replace(/##/g,count);
    }
	theTable.appendChild(rowData);
	return false;
}
to
function addPriceRow(){
	var count = parseInt(document.getElementById('count_price').value);
	document.getElementById('count_price').value=count+1;
	var theTable = document.getElementById('price_listing');
	var oldRow = document.getElementById('price_##');
	var rowData = oldRow.cloneNode(true);
	rowData.id = rowData.id.replace(/##/g,count);
	theTable.appendChild(rowData);
	for (var c = 0,m=oldRow.cells.length;c<m;c++){
        rowData.cells[c].innerHTML = rowData.cells[c].innerHTML.replace(/##/g,count);
    }
	return false;
}

That fixed the problem on our end and it seems to work with the other browsers as well.
That fix will be included in next version of HikaShop.
L'administrateur à désactivé l'accès en écriture pour le public.

Re: Problem adding additional prices il y a 2 ans 4 mois #5551

Thank you Nicolas,
That solved the problem.

Rgds DM
L'administrateur à désactivé l'accès en écriture pour le public.
  • Page:
  • 1
Temps de génération de la page: 0.462 secondes

Follow hikashop on Twitter