Problem adding additional prices

  • Posts: 11
  • Thank you received: 0
13 years 2 months ago #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

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
13 years 2 months ago #5545

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

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

  • Posts: 11
  • Thank you received: 0
13 years 2 months ago #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

Attachments:

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
13 years 2 months ago #5547

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.

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

  • Posts: 11
  • Thank you received: 0
13 years 2 months ago #5551

Thank you Nicolas,
That solved the problem.

Rgds DM

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

Time to create page: 0.064 seconds
Powered by Kunena Forum