[Zen Cart] Missing my next/prev buttons?

Magic SEO URLs for Zen Cart.
robinsonjas
Posts: 20
Joined: Sun Jun 13, 2010 7:38 am

[Zen Cart] Missing my next/prev buttons?

Postby robinsonjas » Wed Oct 06, 2010 6:58 am

When I enable Magic SEO for my store the urls work, but I'm missing my Next/Prev buttons for navigation to other items in my category. Is this normal? It appears that the navigation buttons are on a couple of products, but not all...anyone had experience with this before?
I dont want a customer following an SEO url and then not able to browse thru the store when they get there.
Thanks

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [Zen Cart] Missing my next/prev buttons?

Postby inveo » Wed Oct 06, 2010 10:00 am

Please post step-by-step instructions how to reproduce the problem on your site.

We don’t think it is anything related to MSU since no content or HTML source code is changed besides href parameter inside A tag.

robinsonjas
Posts: 20
Joined: Sun Jun 13, 2010 7:38 am

Re: [Zen Cart] Missing my next/prev buttons?

Postby robinsonjas » Wed Oct 06, 2010 3:47 pm

http://bbmetalfab.com/metalart/index.ph ... Path=23_49

This category has 3 items, currently my includes/application_top.php looks like this:

Code: Select all

#include(DIR_WS_INCLUDES . 'magic_seo_url.php');


You can see when you browse the items I have Prev/Next buttons.

If I uncomment the magic_seo_url.php these buttons disappear.
(Let me know when you've taken a look and I can uncomment.
Thanks

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [Zen Cart] Missing my next/prev buttons?

Postby inveo » Wed Oct 06, 2010 3:54 pm

We only need to see your site with Magic SEO URL installed.Commenting out anything is not necessary.

robinsonjas
Posts: 20
Joined: Sun Jun 13, 2010 7:38 am

Re: [Zen Cart] Missing my next/prev buttons?

Postby robinsonjas » Wed Oct 06, 2010 3:55 pm

I uncommented the

Code: Select all

include(DIR_WS_INCLUDES . 'magic_seo_url.php');

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [Zen Cart] Missing my next/prev buttons?

Postby inveo » Wed Oct 06, 2010 4:07 pm

It looks as buggy code in installed template (includes/templates/<your template name>/templates/tpl_products_next_previous.php).

robinsonjas
Posts: 20
Joined: Sun Jun 13, 2010 7:38 am

Re: [Zen Cart] Missing my next/prev buttons?

Postby robinsonjas » Wed Oct 06, 2010 9:19 pm

I dont have that file in my templates directory:

Code: Select all

xxxxxxxx/includes/templates/template22254/templates> ls
tpl_advanced_search_result_default.php  tpl_modules_advanced_search_categories.php  tpl_modules_main_product_image.php
tpl_ezpages_bar_header.php              tpl_modules_advanced_search_ezpages.php     tpl_product_info_display.php

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [Zen Cart] Missing my next/prev buttons?

Postby inveo » Thu Oct 07, 2010 11:43 am

Then check includes/templates/template_default/templates/tpl_products_next_previous.php file.

robinsonjas
Posts: 20
Joined: Sun Jun 13, 2010 7:38 am

Re: [Zen Cart] Missing my next/prev buttons?

Postby robinsonjas » Thu Oct 07, 2010 12:26 pm

The file exists in template_default, but is unchanged from the standard install.

robinsonjas
Posts: 20
Joined: Sun Jun 13, 2010 7:38 am

Re: [Zen Cart] Missing my next/prev buttons?

Postby robinsonjas » Thu Oct 07, 2010 1:23 pm

the file tpl_products_next_previous.php contains this code:

Code: Select all

<?php
// only display when more than 1
  if ($products_found_count > 1) {

It's not getting thru that 'if' statement...I searched Dev Tools for "$products_found_count" and it's pulled from a sql query in /includes/modules/product_prev_next.php:

Code: Select all

  $sql = "select p.products_id, p.products_model, p.products_price_sorter, pd.products_name, p.products_sort_order
          from   " . TABLE_PRODUCTS . " p, "
  . TABLE_PRODUCTS_DESCRIPTION . " pd, "
  . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
          where  p.products_status = '1' and p.products_id = pd.products_id and pd.language_id= '" . (int)$_SESSION['languages_id'] . "' and p.products_id = ptc.products_id and ptc.categories_id = '" . (int)$current_category_id . "'" .
  $prev_next_order;

  $products_ids = $db->Execute($sql);
  $products_found_count = $products_ids->RecordCount();


I'm just still confused how it works w/ the magic_seo_url.php commented out. Does the sql query build from the url? Are there any working examples that I can look at?
ZenCart Version 1.3.9d