Wrong page heading for wishlist menuitem

  • Posts: 202
  • Thank you received: 3
  • Hikashop Business
3 years 6 months ago #324048

-- HikaShop version -- : 4.3.0 buisiness
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3
-- Browser(s) name and version -- : Chrome

Hi
I created a wishlist menu item, set its type to 'wishlist' instead of 'cart' but when I display the page the page heading is still 'cart" even if I set a custom page heading in the 'page display' tab of the menu item !!

did you see that please ?
thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81475
  • Thank you received: 13058
  • MODERATOR
3 years 6 months ago #324050

Hi,

That's a bug.
Change the line:
if(!empty($menu) && method_exists($menu, 'getParams') && $menu->link == 'index.php?option=com_hikashop&view=cart&layout=listing') {

to:
if(!empty($menu) && method_exists($menu, 'getParams') && in_array($menu->link, array('index.php?option=com_hikashop&view=cart&layout=show', 'index.php?option=com_hikashop&view=cart&layout=listing'))) {

in the file components/com_hikashop/views/cart/view.html.php and it should work fine.

The following user(s) said Thank You: pulsarinformatique

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 3
  • Hikashop Business
3 years 6 months ago #324074

Hi

Sorry it doesn't work. the wishlist url is index.php?option=com_hikashop&view=cart&layout=showcart but the line you gave is in the listing() {...} function which is not called when we are in the wishlist page

it may be this file but should be somewhere else in the file ?

thanks

Please Log in or Create an account to join the conversation.

  • Posts: 81475
  • Thank you received: 13058
  • MODERATOR
3 years 6 months ago #324103

Hi,

That's not what it should be.
Here is what I have on my end:
monosnap.com/file/2dcDpVcVY8rMDPwnc6o2hTuTRXYcGL
As you can see, the layout parameter is "show" not "showcart" for a "cart display" menu item type.
Try deleting the menu item and recreating it.
I stand by my modification which I've successfully tested on my end before writing my previous message.

The following user(s) said Thank You: pulsarinformatique

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 3
  • Hikashop Business
3 years 6 months ago #324117

Hi

there are two locations in the file where I can edit the line you gave

line 160 and line 583

in both case, if I log in on front end (in my example as a super user) and go to the wishlist menu item

if add var_dump("here");die()
just after
if(!empty($menu) && method_exists($menu, 'getParams') && in_array($menu->link, array('index.php?option=com_hikashop&view=cart&layout=show', 'index.php?option=com_hikashop&view=cart&layout=listing'))) {


I never enter the block which is NORMAL since the real url a a wishlist menu item is

index.php?option=com_hikashop&view=cart&layout=showcart

please check the attached screenshot where you can see the url of the wishlist menu item

thanks




Cyril

Attachments:
Last edit: 3 years 6 months ago by pulsarinformatique.

Please Log in or Create an account to join the conversation.

  • Posts: 81475
  • Thank you received: 13058
  • MODERATOR
3 years 6 months ago #324127

Hi,

Try deleting the menu item and recreating it. The URL should then be index.php?option=com_hikashop&view=cart&layout=show and the modification I gave will work.

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
3 years 6 months ago #324306

I have exactly the same problem. Didn't work for me either :(

Please Log in or Create an account to join the conversation.

  • Posts: 81475
  • Thank you received: 13058
  • MODERATOR
3 years 6 months ago #324335

Hi,

So what do you have for the "Link" setting of your menu item ?
Did you apply the modification I recommended ?

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
3 years 6 months ago #324364

Yes I did apply all the recommendations but it didn't change anything. I deleted the menu and recreated it but still no change...

I have now given up and I am using the wishlist module instead (in the article position). That works fine for me.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum