- Posts: 78
- Thank you received: 0
related products breadcrumbs pathway
Ideally we would like this to display the pathway including the original product.
I'm sure thats hard to understand so I'll have another go at spelling it out
Current product pathway
-> category -> sub-category -> product
When you click on a related product on the product page the pathway changes to
-> related product
Ideally we would like to have
-> category -> sub-category -> product -> related product
Please Log in or Create an account to join the conversation.
if( !$this->params->get('random')){
the lines:
if(!empty($product_id)){
$category_pathway = '&category_pathway='.JRequest::getInt('category_pathway',0).'&related_product='.$product_id;
}
and before the line:
$pathway->addItem($product_name,hikashop::completeLink('product&task=show&cid='.(int)$element->product_id.'&name='.$element->alias.'&category_pathway='.$category_pathway.$url_itemid));
the lines:
$related = JRequest::getInt('related_product',0);
if(!empty($related)){
$class = hikashop::get('class.product');
$prod = $class->get($class);
if(!empty($prod)){
$prod->alias = JFilterOutput::stringURLSafe($prod->product_name);
$pathway->addItem($prod->product_name,hikashop::completeLink('product&task=show&cid='.(int)$prod->product_id.'&name='.$prod->alias.'&category_pathway='.$category_pathway.$url_itemid));
}
}
Please Log in or Create an account to join the conversation.
I also tried removing the last line as it appears to be replaced by the last line of the new code, but that didn't work either.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
We released a new version of HikaShop with these changes included.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
We changed a bit the file components/com_hikashop/views/product/view.html.php
Could you replace that file by the one in the archive enclosed and try again ?
This attachment is hidden for guests.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
Pathway before selecting related product: home > category > sub-category > product
Pathway after selecting related product: home > category > sub-category > related product
with the following warning displayed underneath
Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /home/apcrbcco/public_html/libraries/joomla/database/database/mysql.php on line 193
Ideally we are looking for home > category > sub-category > product > related product
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
$prod = $class->get($class);
to:
$prod = $class->get($related);
in that same file to fix the problem.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Are there likely to be any other problems replacing an essential view.html.php with a starter view.html.php?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I have a module that displays random products on the right column of a number of pages on the website, using your code from the file above adds the previous page location to the breadcrumb trail but is it possible to change this to being the items location in the product catagory tree?
For example:
Instead of: home > page_item_clicked > item
This: home > product_catagory > subcatagory>product
Thanks in advance
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.