Sometimes "Compare" and sometimes not?

  • Posts: 2143
  • Thank you received: 747
11 years 4 months ago #155356

-- url of the page with the problem -- : Local dev server
-- HikaShop version -- : 2.3.0 - Build of May 5
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Bonjour France,

The other day I was bragging how easy it is to make "Compare" buttons/checkboxes disappear, no I can't get enough of them, it seems...

Strangely, in the same module it works, and then it doesn't.

Once loading a main category (= 1st under "product category"), I do get compare buttons/checkboxes:





Then, loading a sub category (= 2nd or 3rd level under "product category") from a respective menu, I do not get them anymore:




Is it me? I swear, I have no 'display:none;' anywhere there! ;) And there's no menu- or module-specific setting that I could have messed with, correct?

Or is it 'the system'? That wouldn't be nice...

TIA for clarification.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Attachments:
Last edit: 11 years 4 months ago by lousyfool.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #155373

Hi,

Do you have edited the view "product / listing" ?

Thanks to give us the screenshots of your menu / module configuration and tell us in details when it doesn't work in order to reproduce the problem on our end.

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

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #155511

Thanks for checking back, Xavier.

From your response I can tell it should work, that's good news to start with. Now let's see where I screwed? Thanks in advance for hanging in with me on the subject.

First you must know that, to exclude the possibility of my customization causing it, as usual in such cases I set HikaShop back to 'out of the box' by removing all folders in my_template/html/com_hikashop, as well as replacing relevant modified helpers or classes files with their originals. Sorry, I should have maybe mentioned this. Anyway, always taking those steps first to cause you as little work as possible ;)

However, no Compares also without customizations.


Let me show you the menu/module configs and try to explain:

Under 'product category' I need 3 levels deep of product categories. So, on first level there are 4 what I call 'main categories', then each has a 2nd level of sub-categories, and some of those have then a 3rd level of sub-sub-categories.
Comparing is interesting really only on 2nd and 3rd level; which is where it doesn't work, unfortunately.

Just FYI, there's only one menu calling all products across all main categories (and no comparing wanted/needed), for the rest I'm staying within the main categories, so that a limitation to 2 levels is not a problem, and we here can focus on one of my main categories (named "Audio") - the other 3 are set up identically except for the associated category they're pulling from.

"Audio" has 14 categories under it, and there are up to 4 categories under some of those.

Please see attached a screenshot of the menu settings incl the associated module.

This menu produces correctly
(a) a menu/list of all (sub-)categories on 2 levels under my main category "Audio", and
(b) all products from all (sub-)categories under "Audio",
(c) with Compare

As soon as I click on any of the (sub-)category links, no matter which level, I'm getting
(a) eventually the correct menu/list of sub-categories - provided there are any, and
(b) the correct products in these sub-categories only,
but - incorrectly - no Compare

So, the pattern is: Compare = yes on top category level, Compare = no on lower category levels.

Again, any customization removed, no CSS hiding Compare.

How in the world did I screw this up? :S


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Attachments:

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

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #155804

Hi Xavier,

Got a chance to look into this? Any more info needed?

Guess I can't wait to find out where and how I screwed in this case... ;)

Thanks again.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #155831

Hi,

For testing purpose, can you try to edit the view "product / listing_img_title" and remove/comment the code

JRequest::getVar('hikashop_front_end_main',0) &&

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

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #155933

Hello Xavier,

So I turned this

<?php
if(JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) { ?>

into this
<?php
if(JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) { ?>

But no change, sorry, it's all the same and no improvement.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #156049

Hi,

Again, to test, can you try to put the following code just before the if condition:

 $this->params->set('show_compare','1');

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

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #156054

Ok, here we go:

With this code version

<?php
$this->params->set('show_compare','1');
if(JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) { ?>

the only thing changing is the Compare checkbox/label turning into a Compare button. Nothing else, and definitely still no Compare in (sub-)subcategories.

Also, just for the jux of it, tried this
<?php
$this->params->set('show_compare','1');
if(JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) { ?>

but you can imagine: no change, no Compare.

Also tried changing your 'set' to 'get', but nothing matters. Any more ideas, keep them coming...


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #156288

Hello Xavier,

I just finished updating to 2.3.1. Sorry to say that Compare still does not work for (sub)subcategories. :( :( :(

Now what? Hope you haven't given up...


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 84303
  • Thank you received: 13698
  • MODERATOR
11 years 3 months ago #156294

We don't have the problem on our end. It would help to be able to see the issue on the website.

Maybe you could try to simply scrap the if and have just:
if(true){

That way, it will always display the comparison zone, regardless of the options.
However, I don't see why it would work for some categories and not others. The code cannot do that as far as I can see.

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

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #156529

Thanks Nicolas. We seem to be out of polarity somehow: you don't have that same problem and can't imagine how the code causes it, and I do have the problem and can't imagine how I caused it. Again, it persists even without all customisation. My menu structure might be a bit "around the corner", but it shouldn't confuse the PHP code, no?

As I wouldn't have a problem with Compare everywhere (could hide it via CSS where I don't want it), I tried the "true" way. Promptly, I do have the screen full of Compares, also where it didn't show before, but in the formerly problematic modules one problem still persists: when checking Compare boxes, the 'compare zone' with the button triggering the comparison view will not show. Duh?!

So, now I'm turning Compare off. Once on the hosting server, you'll be able to x-ray the site top to bottom. and even if we wouldn't get to work immediately, since it's a Market site it won't have thousands of product on day #1, so that'll be okay, too.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 84303
  • Thank you received: 13698
  • MODERATOR
11 years 3 months ago #156810

Yes, if you change the code to display the buttons, you also want to change the code to display the main trigger button.
In that same file you would thus need to change:
if(hikashop_level(2) && JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task')=='listing' && $this->params->get('show_compare')) {?>
to:
if(true) {?>

But yes, an access to the website will be great to see that more in depth.

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

  • Posts: 2143
  • Thank you received: 747
11 years 3 months ago #157093

Done that, Nicolas. Same problem = no 'compare zone' = no compare button.

Whatever the culprit is, no matter what I do in listing_img_title fixes it, so I guess it's not that view causing it.

For the record, in my listing-img_title I don't have that part "hikashop_level(2) &&"...


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #157098

Hi,

But yes, an access to the website will be great to see that more in depth.

You can send it to us using the private messages system, don't forget to give the url to that topic ;)

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

  • Posts: 2143
  • Thank you received: 747
10 years 10 months ago #176922

Hi Guys,

Just for the record, "Compare" works perfectly fine now. Not sure why, or why it didn't before, but latest since 2.3.4 the mystery has solved itself.

By the way, big thanks for 2.3.4! I'm not that long on board yet, but for me 2.3.4 was the most significant update, bringing much good stuff and getting rid of what needed to be resolved. Brilliant!

Keep up the good work! :)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 84303
  • Thank you received: 13698
  • MODERATOR
10 years 10 months ago #176950

Hi,

Thank you ! We've been working hard on it for the past three months.
It's a lot of small changes, fixes and improvements here and there.
We might do a 2.3.5 in one or two months, but we're now looking at the 3.0.0 with lots of big improvements for the beginning of 2015.

The following user(s) said Thank You: lousyfool

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

Time to create page: 0.076 seconds
Powered by Kunena Forum