- Priority: 0
- Status: Closed
- Theme: Venedor
- Assigned To: No-one
- Private: No
- Open Date: 27.01.17, 13:37
- Opened by: Alex
- Closed by: Marek
- Closed on: 05.08.17, 18:50
- Reason: Closed
- Comment: Glad to help!
Ticket #10188 - ven2.3 flexmenu no product name if disabled price
If price disabled (catalog mode) no product name
FIX:
file \modules\pk_flexmenu\pk_flexmenu.php line 1157
if ($product->show_price && !(bool)$pscatmode){ $this->_menu .= '<span class="price">'.( !$priceDisplay ? Tools::displayPrice(Tools::ps_round($product->price*(0.01*$product->tax_rate)+$product->price, 2)) : Tools::displayPrice(Tools::ps_round($product->price, 2))).'</span>'.(($reduction) ? ' <span class="old_price">'.Tools::displayPrice($product->getPriceWithoutReduct(false)).'</span>' : '').'<a href="'.htmlentities($product->getLink()).'" class="menu-product-name">'.$nm.'</a></li>'.PHP_EOL;}
change to
$this->_menu .= '<a href="'.htmlentities($product->getLink()).'" class="menu-product-name">'.$nm.'</a>'; if ($product->show_price && !(bool)$pscatmode){ $this->_menu .= '<span class="price-container'.(($reduction) ? " reduction" : "").'"><span class="price">'.( !$priceDisplay ? Tools::displayPrice(Tools::ps_round($product->price*(0.01*$product->tax_rate)+$product->price, 2)) : Tools::displayPrice(Tools::ps_round($product->price, 2))).'</span>'.(($reduction) ? ' <span class="old_price">'.Tools::displayPrice($product->getPriceWithoutReduct(false)).'</span>' : '').'</span>'.PHP_EOL;}
Comments
I have in line 1335 (not 1157):
The code is not exactly the same (flexmenu 1.4.7). I have edited the file with the code you suggested and now it duplicates names :_(
Yes of course because I already fixed for you and you don’t need to do nothing. I wrote that in your ticket.
:D
Please rollback your changes and check. It works ok
Hahahaha, sorry, I misunderstood you. I did think you fixed it in your master branch, not directly in my code. I rolled it back and works ok, thanks
PS: it is very difficult to show the product name in 2 lines so it doesn’t cut the name so short?
If you want to see more title characters you can increase this value https://www.screencast.com/t/C1YGWspJ3b
file \modules\pk_flexmenu\pk_flexmenu.php