Author Topic: [BUG] Hidden category shown on breadcumb  (Read 1366 times)

Marttyn

  • Jr. Member
  • **
  • Posts: 93
Re: [BUG] Hidden category shown on breadcumb
« Reply #15 on: February 05, 2018, 18:33:05 pm »
Thanks Milbo!
I will consider a membership.
But unfortunately, when i saw the bug and no quick solution, i opted for the suggested method of giving a manufacturer to all of my products.
Anyway, i "recreated" a similar category structure, and all problems seems to dissapear except for this:
-unpublished category name appended to the page/tab name
-breadcrumb of the product is under root instead of the parent category
-SEF url has the same problem as the breadcrumb

The first problem can be solved changing /components/com_virtuemart/views/productdetails/view.html.php :
Code: [Select]
$document->setTitle(strip_tags(html_entity_decode(($category->category_name ? (vmText::_($category->category_name) . ' : ') : '') . $product->product_name,ENT_QUOTES)));to this:
Code: [Select]
$document->setTitle(strip_tags(html_entity_decode(($category->category_name ? ($category->published ? (vmText::_($category->category_name) . ' : ') : '') : '') . $product->product_name,ENT_QUOTES)));
And I think the two last are not really problems, its the regular behaviour, as the product in fact dont have any published category... anyway, it would be better to keep the category of the parent for both the URL and the breadcrumb. Just a suggestion.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9667
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: [BUG] Hidden category shown on breadcumb
« Reply #16 on: February 06, 2018, 16:59:31 pm »
I use now
Code: [Select]
$category = '';
if($category->published and !empty($category->category_name)){
$category = $category->category_name.': ';
}
$document->setTitle(strip_tags(html_entity_decode($category . $product->product_name,ENT_QUOTES)));

is nicer to read. The others are not really a problem and yes, there is imho even a method to get the prior category, but ... only when the product is in more than one category. We cannot list the product below the wrong category.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Marttyn

  • Jr. Member
  • **
  • Posts: 93
Re: [BUG] Hidden category shown on breadcumb
« Reply #17 on: February 06, 2018, 17:24:19 pm »
nice

aftertaf

  • Jr. Member
  • **
  • Posts: 206
    • sO couture
  • VirtueMart Version: 3.2.14
Re: [BUG] Hidden category shown on breadcumb
« Reply #18 on: February 06, 2018, 22:45:46 pm »
hi,
will this make it into the next version in that case ? :)
Webmaster for my wife (link in my profile ;)
Extensions / plugins : POSForWebshops, TemplatecreatorCK ,MaximenuCK, and PageBuilderCK, VM BatchEdit Pro, VM CustomFilters Pro, Awocoupon Pro, slogin, supersaas,  among other things...
Joomla! 3.8.6//VM 3.2.14//PHP7.0.18 & mariadb 10.1.22 on Debian
big up to notepad++!!!!

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3393
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: [BUG] Hidden category shown on breadcumb
« Reply #19 on: February 06, 2018, 23:56:30 pm »
Note that if you use shorten url, in product details the breadcrumb is empty and dont use the last visited category(nothing to do with this bug, but with breadcrumb).