Hi,
Thanks
I don't know why I can't reproduce your problem in my test website, I should have something different in the page.
But the error with the code help me to point the problem.
Please edit once again the file "administrator/components/com_hikamarket/types/vendor_selection.php"
And edit the "$js = ....." in the function initJs.
protected function initJs() {
static $jsInit = null;
if($jsInit === true)
return;
$vendor_format = 'data.vendor_name';
if($this->app->isAdmin())
$vendor_format = 'data.id + " - " + data.vendor_name';
$js = '
if(!window.localPage)
window.localPage = {};
/* rest of the script that you will have to replace */
';
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
$jsInit = true;
}
You will have to use this code instead :
$js = '
if(!window.localPage)
window.localPage = {};
window.localPage.filterChooseVendor = function(el, name) {
window.hikamarket.submitFct = function(data) {
var d = document,
vendorInput = d.getElementById(name + "_input_id"),
vendorSpan = d.getElementById(name + "_span_id");
if(vendorInput) { vendorInput.value = data.id; }
if(vendorSpan) { vendorSpan.innerHTML = '.$vendor_format.'; }
if(d.adminForm)
d.adminForm.submit();
else {
var f = d.getElementById("adminForm");
if(!f) f = d.getElementById("hikamarketForm");
if(!f) f = el.form;
if(f) f.submit();
}
};
window.hikamarket.openBox(el,null,(el.getAttribute("rel") == null));
return false;
};
window.localPage.filterSetVendor = function(el, name, value) {
var d = document,
vendorInput = d.getElementById(name + "_input_id"),
vendorSpan = d.getElementById(name + "_span_id");
if(vendorInput) { vendorInput.value = value; }
if(vendorSpan) {
if(value == 0)
vendorSpan.innerHTML = "'.JText::_('NO_VENDOR', true).'";
else
vendorSpan.innerHTML = "'.JText::_('ALL_VENDORS', true).'";
}
if(d.adminForm)
d.adminForm.submit();
else {
var f = d.getElementById("adminForm");
if(!f) f = d.getElementById("hikamarketForm");
if(!f) f = el.form;
if(f) f.submit();
}
};
';
I added some extra checks to prevent several different kind of trouble.
Regards,