Link to home
Start Free TrialLog in
Avatar of wilson1000
wilson1000

asked on

Duplicate an AlgoZone AJAX Menu Bar

Hi Experts,

I desperately need to duplicate a menu bar which is located at the top of my product results, I need this to appear at the bottom of the results so my customers can navigate when they browse to the bottom of the page.

URL = www.agift4him.com

The site is a CRE Loaded PRO deployment with an AlgoZone template. The menu bar houses the sort by, layout styles and product navigation features. It is populated via AJAX.

The task seems simple however, I can't get the menu to show up.

Please find attached all relevant files - your help is very much appreciated!

NOTES:

The menu bar is found in the pl.view.js file (line 1) and is contained in a javascript function.

The HTML for the menu bar is generated in the new_products.php file (line 62) within the <div id="pl_menu"></div> element.

The menu bar is called in to the new_products.php page from the pl.core.js. (from around line 42?)

I added the <div id="pl_menu2"></div> element into the new_products.php page (line 62) and the $("#pl_menu2").html(showPLmenu()); in pl.core.js file (line 47) to test but with no luck.

Thank you!
FILEs.zip
Avatar of sushiguru
sushiguru
Flag of United Kingdom of Great Britain and Northern Ireland image

I can see a couple of problems initially:

Line 1 is repeated in line 14
lines 17 and 19 are repeated in 18 and 20.

The GA javascript is missing a couple of brackets - add }); in a line just above </script> (line 12)

Try this and let me know how you get on.

sg.
<!-- RCI [BOM] -global-asynchronous : includes/runtime/global/GA_global_asynchronous.php -->

<!-- Google Analytics RCI start -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12986285-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
</script>
<!-- Google Analytics RCI end -->
<!-- RCI [EOM] -global-asynchronous : includes/runtime/global/GA_global_asynchronous.php -->
<!-- warnings //-->
<!-- warning_eof //-->
<!-- RCI [BOM] -mainpage-top : includes/runtime/mainpage/login_mainpage_top.php -->
<!-- RCI [EOM] -mainpage-top : includes/runtime/mainpage/login_mainpage_top.php -->
<!-- RCI [BOM] -mainpage-top : includes/runtime/mainpage/sss_mainpage_top.php -->
<!-- RCI [EOM] -mainpage-top : includes/runtime/mainpage/sss_mainpage_top.php -->
<!-- header //-->

Open in new window

Avatar of wilson1000
wilson1000

ASKER

Thank you, so much! I moved home today so will test this asap

Kind regards

Damien
Sorry; just realised that all the duplicate lines are just comments to show code blocks; just ignore that one - my bad.

The javascript is definitely throwing an error though - fix that first and retest.

Cheers,
sg
Hi, I want to thank you for your patients with this.

The server my site is hosted on has had an attack and is unavailable at the moment - please bear with me!

Thanks and kind regards

Damien
@sushiguru : I've made that amendment so thank you for that - well spotted btw

What should I do next?
OK - I think I see the problem.  Change line 61-62 of new_products.php to the line below.  Your second menu was within the products dev, and so being overwritten by the products content when it's loaded!

Try and let me know,
sg.
$list_box_contents[0][] = array(
     'align' => 'center',
     'text' => '<div id="pl_container">
                   <div id="pl_menu"></div>
                   <div id="pl_content">
                      <div id="pl_loading"><img src="'.DIR_WS_TEMPLATE_IMAGES.'pl_images/ajax_loader2.gif" border="0" alt="Loading"></div>
                   </div>
                   <div id="pl_menu2"></div>
                </div>'
      );

Open in new window

Hi Sushiguru - the menu is now showing on the site, thank you.

The issue now is that the buttons on the second menu aren't working. Do you have any idea why?

Thanks again!

I can't see the menu on your site; have you updated the public site at: http://www.agift4him.com/ ?

sg
Ah, if you click on "new gift ideas" you'll see it
Hi,

Is there anymore I can do with this or should I be asking a different question??

Thank you
Sorry - been away for a long weekend.  Let me look again and see what the issue is...

sg.
ASKER CERTIFIED SOLUTION
Avatar of sushiguru
sushiguru
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is extremely helpful sg and what I consider a resolve for this particular question.
I will post files for help actioning what you have suggested in another post with a similar name to this post.
"Duplicate an AlgoZone AJAX Menu Bar  2"
Thank you once more for highlighting the issue.
Thanks; glad to help, and I hope you get your second menu working!

sg.