HTML validation

  • Posts: 223
  • Thank you received: 6
  • Hikashop Business
8 years 1 month ago #268794

-- url of the page with the problem -- : aketo.org
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.0
-- PHP version -- : 7.1.0
-- Error-message(debug-mod must be tuned on) -- : Error: The for attribute of the label element must refer to a non-hidden form control

Hi,
i used Nu Html Checker from validator w3 org and i got an error on products view page

Error: The for attribute of the label element must refer to a non-hidden form control.

i found in show_block_custom_main.php following

<tr class="hikashop_product_custom_<?php echo $oneExtraField->field_namekey;?>_line">
			<td class="key">
				<span id="hikashop_product_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_name">
					<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
				</span>
			</td>
			<td>
				<span id="hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_value">
					<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
				</span>
			</td>
		</tr>

as i got
<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
this code generate this error but i cant find body of show function.

So where is this function body (what is the filename) to check and solve error ?

p.s. also this html validator found in hikashop 3.0.1 version problems with scheme.org tags, i repaired it
but you should check it byyourself and to include this changes in future hikashop patches

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

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 1 month ago #268800

Hi,

Thank you for your feedback. We'll fix that on our end for the next version of HikaShop.
In the mean time, you will find the getFieldName and show functions of the fields in the file administrator/components/com_hikashop/classes/field.php

Regarding the scheme.org tags, the google validator doesn't find any problem with them in the tests we did and I've also run some tests this morning and they were OK. Would you have more information ? Are you sure it's not coming from some customization ?
For example, on our demo website, before this morning, there was an issue with the price tag because of an old view override of the template we're using there. I've found it while doing my tests. I've then removed the view override as it wasn't doing anything anyway and it's now displaying properly.

Last edit: 8 years 1 month ago by nicolas.

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

  • Posts: 223
  • Thank you received: 6
  • Hikashop Business
8 years 1 month ago #268912

ok , thank you

is it neccesary to return this label tag at all ?

return '<label for="'.$this->prefix.$field->field_namekey.$this->suffix.'"'.$options.'>'.$this->trans($field->field_realname).$required.'</label>';
may i return value only ?
return $this->trans($field->field_realname).$required;

As about scheme - here is an error The itemprop attribute was specified, but the element is not a property of any item.

you may see by yourself on validator.w3.org/nu/ or html5.validator.nu/ use show sourse in checkbox
here is your demo page demo.hikashop.com/index.php/en/hikashop/...oduct/1-pink-sandals

i forgot what and where exactly i remake but i think itemprop="Product" is uneccesary (should to remove caus doubled) in show.php or show_tabular.php because i have changes only in this files
here is my example website page aketo.org/product/pchv101-k18-a/category_pathway-938 it is also valid on Structured Data Testing Tool - Google

and the last one

product / show_block_custom_main.php

Error^ The width attribute on the table element is obsolete. Use CSS instead.
<div id="hikashop_product_custom_info_main" class="hikashop_product_custom_info_main">
	<h4><?php echo JText::_('SPECIFICATIONS');?></h4>
	<table width="100%">
		<?php echo $specifFields; ?>
	</table>
as my template uses bootstrap i replaced
<table class="table">

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

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 1 month ago #268923

Hi,

You can remove the label if you want. We will keep it with only the for removed when necessary as the labels usually have specific CSS added to the page by the template and you want to have something consistent throughout the website and it's normal to have a label tag around the label of elements in a form.

Thank you for the feedback on the itemprop and the table width. We'll add patches for the next version in order to handle that.

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

  • Posts: 223
  • Thank you received: 6
  • Hikashop Business
8 years 3 weeks ago #270035

1. images titles somethere gone in product editor module after update (images and files section)? is it ok ?
2. if option in specification section selectet - there is an error occured on a product view page
also description and specifications do not display

Uncaught TypeError: (intermediate value).send is not a function
    at hikashopRefreshOptionPrice (trm1-shch2-u-r-m02:11)
    at hikashopChangeOption (trm1-shch2-u-r-m02:10)
    at HTMLDocument.<anonymous> (trm1-shch2-u-r-m02:12)
    at i (eda3be860f348d9046e4ced3b7c78fb3.js:260)
    at Object.fireWith [as resolveWith] (eda3be860f348d9046e4ced3b7c78fb3.js:260)
    at Function.ready (eda3be860f348d9046e4ced3b7c78fb3.js:260)
    at HTMLDocument.K (eda3be860f348d9046e4ced3b7c78fb3.js:260)

3. how to make this input fields a little bit more compact ? they were until i updated template to a bootstrap 3 template
the are real huge - i use html5 quantity view in hikashop settings by default
images are on links
drive.google.com/open?id=0B4ZkIeItsId7Wjljc0t1V1NhSmc
drive.google.com/open?id=0B4ZkIeItsId7R056RnRCbVMwYVU

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

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 3 weeks ago #270054

Hi,

1.
I don't understand what you mean. I still have the title field when I edit an image of a product:
monosnap.com/file/BgGk30BBbDBikw2pHOSYHdihKObLsR
Please provide more information.

2.
The options system either use jquery or mootools to update the price with options when an option is selected.
If you get that javascript error, it would indicate that neither are available on the page.
Try changing the code:

try{
				new Ajax('".$baseUrl."price='+price_with_options.value+'".$url_itemid."',  { method: 'get', onComplete: function(result) { var totalPrice = window.document.getElementById('hikashop_product_price_with_options_main'); if(totalPrice) totalPrice.innerHTML = result;}}).request();
			}catch(err){
				new Request({url:'".$baseUrl."price='+price_with_options.value+'".$url_itemid."', method: 'get', onComplete: function(result) { var totalPrice = window.document.getElementById('hikashop_product_price_with_options_main'); if(totalPrice) totalPrice.innerHTML = result;}}).send();
			}
to:
var target = document.getElementById('hikashop_product_price_with_options_main');
			if(target)
				window.Oby.xRequest('".$baseUrl."price='+price_with_options.value+'".$url_itemid."', { mode: 'GET', update: target });
in the file "option" of the view "product" via the menu Display>Views.
That will use our own javascript library instead of mootools/jquery and it should work fine in any case.

3.
It's just because your template CSS forces the width of the inputs on the frontend. So you need to add custom CSS to force yourself the width over the CSS from the template.
For example, you could try: .hikashop_cart_module input, .hikashop_product input{ width: 30px !important; }
The exact CSS to use depends on how the shop is configured and what CSS is added by the template, so with just the screenshots, I can't guarantee that it will be that exact CSS which will work. You might need to adapt it.

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

  • Posts: 223
  • Thank you received: 6
  • Hikashop Business
8 years 3 weeks ago #270092

i got 2 and 3. thank you very much
in 1st - title field has gone somethere after update 3.0.01
also i cant delete images in files and images section - as on yours picture
they were (i mean in past i could change pictures titles and delete pictures) but now i cant
only add pictures
when i mouseover picture it change mouse pointer from pointer to hand as you can press here
also i see different links than i mouse over

index.php?option=com_hikashop&ctrl=product&task=selectimage&cid=60&pid=29913&tmpl=component
index.php?option=com_hikashop&ctrl=product&task=edit&cid[]=29913#delete

but if i press this link on a page it does not any affect (no popup window)


i tried to see page errors in ctrl+shift+I in chromium but there are no errors on a page

Last edit: 8 years 3 weeks ago by Bender.

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

  • Posts: 223
  • Thank you received: 6
  • Hikashop Business
8 years 3 weeks ago #270132

Also - what happened - after i press add to cart button i redirected to checkout page, but i need to stay on product page ?

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

  • Posts: 223
  • Thank you received: 6
  • Hikashop Business
8 years 3 weeks ago #270135

Now the new error occured

smh2gi-0020-31-2:139 Uncaught TypeError: $(...).addEvents is not a function
    at HTMLDocument.<anonymous> (smh2gi-0020-31-2:139)
    at i (js-225ef-50142.js:7)
    at Object.fireWith [as resolveWith] (js-225ef-50142.js:7)
    at Function.ready (js-225ef-50142.js:7)
    at HTMLDocument.K (js-225ef-50142.js:7)


In some categories related product are showing but in some categories they are not

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

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 3 weeks ago #270115

Hi,

1. This problem looks like it's related to another extension creating a javascript error on the page.
It could be a plugin of the group "system" or of the group "xtd-editor" or of the group "hikashop" (a lot less likely), or a backend module you might have.
The best to identify the culprit is to disable them one by one and check each time if it solves the problem.
Once the extension causing the problem is identified, it can either be removed if not used, or fixed, if necessary, by contacting the developer, or maybe we can do something on our end to circumvent the situation. But we can't say much without knowing where the issue comes from.

2. Supposing that you're using the latest version of HikaShop, and supposing that you have the "checkout legacy" setting turned off, you need to configure the "HikaShop add to cart notification" plugin via the Joomla plugins manager. If it is disabled, then no notification appears on the screen when a product is added to the cart and thus the system redirects the customer to the checkout in order to let him know that it worked.

Last edit: 8 years 3 weeks ago by nicolas.

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

  • Posts: 223
  • Thank you received: 6
  • Hikashop Business
8 years 3 weeks ago #270154

2) the plugin is enabled. legacy mode turned off. now i set Display location to Popup but it was Web page and it worked fine 3 days ago
what is th difference beetween Web page and Add to cart button display location ? both redirect me to checkout page

3. Here is 2 url in first everything works fine in second by some reason description and specification tabs not work
why so ?

https://aketo.kz/brands/owen/regulyatory/2trm1/product/p2trm1-shch1-u-rr
https://aketo.kz/brands/segnetics/kontrollery/smh2g-i/product/smh2gi-0020-31-2

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

  • Posts: 83986
  • Thank you received: 13603
  • MODERATOR
8 years 3 weeks ago #270161

Hi,

2. I do have the popup after the add to cart and I'm not redirected to the checkout:
monosnap.com/file/lCA1xu7sLDG6vX8KeLtQ7RzPHMAWwO
So it seems to work no ?
The settings of the plugin allow you to display the notification in a different way on the page, but it shouldn't change anything regarding the redirection to the checkout.

3. You have a javascript error on that page:
monosnap.com/file/ISNlNU03I7sMlR5ic9a3w6vC1ySD2D
Because of that, the javascript for the tabs system cannot be initialized.

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

Time to create page: 0.104 seconds
Powered by Kunena Forum