Jump to content

when i click on my product, the end of URL has #


Recommended Posts

i think that it is related to the .tpl file

can you show the contents of your category.tpl file ?

 

(im asking because i've noticed that hash sign # is added only if i click on product thumb from the product list in the category page)

Link to comment
Share on other sites

checked. do not find anything wrong.

 

here is the code

 

{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 6844 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($category)}
{if $category->id AND $category->active}
 <h1>
  {strip}
   {$category->name|escape:'htmlall':'UTF-8'}
   {if isset($categoryNameComplement)}
 {$categoryNameComplement|escape:'htmlall':'UTF-8'}
   {/if}
  {/strip}
 </h1>

 <!--<div class="resumecat category-product-count">  ALYSUM
  {include file="$tpl_dir./category-count.tpl"}
 </div>-->

 {if $scenes || $category->description || $category->id_image}
 <div class="content_scene_cat">
  {if $scenes}
   <!-- Scenes -->
   {include file="$tpl_dir./scenes.tpl" scenes=$scenes}
   {else}
 <!-- Category image -->
 {if $category->id_image}
 <div class="align_center">
  <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, $img_name.category)}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" />
 </div>
 {/if}
   {/if}
   {if $category->description}
 <div class="cat_desc">
  <h2>{$category->name}</h2><!--  ALYSUM -->
  <span>{$category->description|truncate:100:'...'}</span><!--  ALYSUM -->
  <!--<a href="#" class="lnk_more">{l s='More'}</a>  ALYSUM -->
 </div>
   {/if}
 </div>
 {/if}
 <!-- {if isset($subcategories)}  ALYSUM
 <!-- Subcategories
 <div id="subcategories">
  <h3>{l s='Subcategories'}</h3>
  <ul class="inline_list">
  {foreach from=$subcategories item=subcategory}
   <li class="clearfix">
 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img">
  {if $subcategory.id_image}
   <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
  {else}
   <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
  {/if}
 </a>
 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
 {if $subcategory.description}
  <p class="cat_desc">{$subcategory.description}</p>
 {/if}
   </li>
  {/foreach}
  </ul>
  <br class="clear"/>
 </div>
 {/if}
 -->
 {hook h='layeredNav'}
 {if $products}
  <div class="content_sortPagiBar">   
   <div class="sortPagiBar clearfix">
 <div class="views_float">
  {include file="./product-compare.tpl"}
  {include file="./product-sort.tpl"}		  
  {include file="./nbr-product-page.tpl"}
 </div>
 <div class="views">
  <div class="view_btn" id="view_grid" title="grid"></div><span class="grid_title">{l s='Grid'}</span>
  <div class="view_btn" id="view_list" title="list"></div><span class="list_title">{l s='List'}</span>
 </div>	
   </div>
  </div>
  <div id="listing_view" class="view_list">
   {include file="./product-list.tpl" products=$products}
  </div>

  <div class="content_sortPagiBar">
   <div class="sortPagiBar sortPagiBarFooter clearfix">
   {include file="./pagination.tpl"}
   </div>
  </div>
 {elseif !isset($subcategories)}
  <p class="warning">{l s='There are no products in this category.'}</p>
 {/if}
{elseif $category->id}
 <p class="warning">{l s='This category is currently unavailable.'}</p>
{/if}
{/if}

Link to comment
Share on other sites

looks normal also

 

{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 7457 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{if isset($products)}
<!-- Products list -->
<ul id="product_list" class="clear">
{foreach from=$products item=product name=products}
 <li class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix">
  <div class="left_block">
   {if isset($comparator_max_item) && $comparator_max_item}
 <p class="compare">
  <input type="checkbox" class="checkbox comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked="checked"{/if} />
  <label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label>
 </p>
   {/if}
  </div>
  <div class="center_block">   
 <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}">
  <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_alysum')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if}  />
  {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}
 </a>
  <!-- START color picker -->
  <div class="color_picker">
  <!-- disable color, will be using "more colors text"
  {if isset($product.colors)}{foreach from=$product.colors item=v}
  <span style="background: {$v.value};" title="{$v.name}"></span>{/foreach}
  {/if}
  -->
  {if !empty($product.colors)}
   <font color="#9933ff">More Colors</font>
  {/if}
  </div>
  <!-- END color picker -->

 <div class="product-info">
  <h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:30:'...'}</a></h3>
  <div class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</div>
 </div>	 
 <div class="right_block">	 
  {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}	

  <div class="content_price">
   {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if}	 
  </div>	

  {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE}
   {if ($product.allow_oosp || $product.quantity > 0)}
    {if isset($static_token)}
	 <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
    {else}
	 <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", false)} title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>
    {/if}	 
   {else}
    <span class="exclusive"><span></span>{l s='Add to cart'}</span><br />
   {/if}
  {/if}
  {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>{/if}
  {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span>
  {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span>{/if}
  {if isset($product.online_only) && $product.online_only}<span class="online_only">{l s='Online only!'}</span>{/if}
  {/if}
 </div>
  </div>
 </li>
{/foreach}
</ul>
<!-- /Products list -->
{/if}

Link to comment
Share on other sites

okay i found it.

 

here it is the code:

{if(typeof(param_product_url)!='undefined'){$.each($('ul#product_list li.ajax_block_product .product_img_link,'+'ul#product_list li.ajax_block_product h3 a,'+'ul#product_list li.ajax_block_product .product_desc a,'+'ul#product_list li.ajax_block_product .lnk_view'),function(){$(this).attr('href',$(this).attr('href')+param_product_url);});[spam-filter]

 

and it is a part of:

<script type="text/javascript">/* <![CDATA[ */current_friendly_url='#';param_product_url='#';/* ]]> */</script>

located in the column.

 

 

what to do? well, the best thing - remove the code. But the question is - is this code necessary? maybe it is a part of some module that you've got?

 

can you turn off CCC under the adv preferences > performance? it will be much easier to find the source of the code that i mentioned above

Link to comment
Share on other sites

okay i found it.

 

here it is the code:

{if(typeof(param_product_url)!='undefined'){$.each($('ul#product_list li.ajax_block_product .product_img_link,'+'ul#product_list li.ajax_block_product h3 a,'+'ul#product_list li.ajax_block_product .product_desc a,'+'ul#product_list li.ajax_block_product .lnk_view'),function(){$(this).attr('href',$(this).attr('href')+param_product_url);});[spam-filter]

 

and it is a part of:

<script type="text/javascript">/* <![CDATA[ */current_friendly_url='#';param_product_url='#';/* ]]> */</script>

located in the column.

 

 

what to do? well, the best thing - remove the code. But the question is - is this code necessary? maybe it is a part of some module that you've got?

 

can you turn off CCC under the adv preferences > performance? it will be much easier to find the source of the code that i mentioned above

 

it is under which file?

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...