- Posts: 7
- Thank you received: 1
Showcarts view breaks HTML if filter applied
12 years 10 months ago #139675
by ropreoso
Showcarts view breaks HTML if filter applied was created by ropreoso
-- url of the page with the problem -- :
www.sator.cz
(Not accessible for public yet.)
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5.11
-- PHP version -- : 5.2.9
-- Browser(s) name and version -- : Google Chrome 30.0.1599.101 m
-- Error-message(debug-mod must be tuned on) -- : N/A
There is nice feature. Names of all items that passed filter are divided to part that exactly match filter and that does not. Part that matched filter is tagged by span tag with "searchtext" class. It means that name of cart in that view contains HTML tags. But this name is also inserted to title attribute with HTML tag:
This is code of cart/showcarts view;
This is a result when filter "Tes" applied:
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5.11
-- PHP version -- : 5.2.9
-- Browser(s) name and version -- : Google Chrome 30.0.1599.101 m
-- Error-message(debug-mod must be tuned on) -- : N/A
There is nice feature. Names of all items that passed filter are divided to part that exactly match filter and that does not. Part that matched filter is tagged by span tag with "searchtext" class. It means that name of cart in that view contains HTML tags. But this name is also inserted to title attribute with HTML tag:
This is code of cart/showcarts view;
Code:
<td data-title="<?php echo JText::_( 'CART_PRODUCT_NAME' );?>">
<a href="<?php echo hikashop_completeLink('cart&task=showcart&cart_id='.$cart->cart_id.'&cart_type='.$cart_type); ?>" title="<?php echo $cart->cart_name;?>"><?php echo $cart->cart_name;?></a>
</td>
This is a result when filter "Tes" applied:
Code:
<td data-title="Název zboží">
<a href="/index.php/cz/profile/cart-select/cart/showcart/cart_id-7/cart_type-cart" title="<span class=" searchtext"="">Test">
<span class="searchtext">Tes</span>t
</a>
</td>
Please Log in or Create an account to join the conversation.
12 years 10 months ago #139802
by Xavier
Replied by Xavier on topic Showcarts view breaks HTML if filter applied
Hi,
A link and an access to your website is welcome
It will help us to reproduce the problem on our end and then debug it.
How did you configure it, you have a module on the showcarts page ?
A link and an access to your website is welcome
It will help us to reproduce the problem on our end and then debug it.
How did you configure it, you have a module on the showcarts page ?
Please Log in or Create an account to join the conversation.
12 years 10 months ago - 12 years 10 months ago #140091
by ropreoso
Replied by ropreoso on topic Showcarts view breaks HTML if filter applied
On my page I have already fixed it by overriding view and replacing
with
In my configuration menu item type "Cart listing" is associated with menu item (cart listin is opened in the content).
I have created account to access offline pages www.sator.cz .
User: hikashop
Password: hikashop
Menus are missing in english version yet. Try Czech one. Menu "Můj účet">"Vybrat košík".
Code:
title="<?php echo $cart->cart_name;?>"
with
Code:
title="<?php echo strip_tags($cart->cart_name);?>"
In my configuration menu item type "Cart listing" is associated with menu item (cart listin is opened in the content).
I have created account to access offline pages www.sator.cz .
User: hikashop
Password: hikashop
Menus are missing in english version yet. Try Czech one. Menu "Můj účet">"Vybrat košík".
Last edit: 12 years 10 months ago by ropreoso.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds