Forums / All Other Contributions/Addons / Fix for Easy Populate Froogle with Chemo's Ultimate URL's

Fix for Easy Populate Froogle with Chemo's Ultimate URL's

Locked

Started by mccord42 on 8 Feb 2007, 3:06 PM · Views: 1,986

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
8 Feb 2007, 3:06 PM
#1
mccord42 avatar

mccord42

New Zenner

Join Date:
Feb 2007
Posts:
2
Plugin Contributions:
0

Fix for Easy Populate Froogle with Chemo's Ultimate URL's

I looked around the board and couldn't seem to find any way to get the Froogle exported file to use the SEO URL's. Most people seemed to just say to rely on the 301 redirect, but I didn't want to do that. After a bit of playing around I came up with this. It may not be the prettiest or simplest fix, but it does work and doesn't seem to break anything. Use at your own risk though. I am not a programmer, just a tinkerer and as such, I can't really provide support if you mess something up.

1.)Copy the two files seo.url.php and seo.install.php from /includes/classes/ to /admin/includes/classes/

2.)In /admin/includes/functions/ add the following right below the comment block at the top:

////
// Ultimate SEO URLs v2.100
// The HTML href link wrapper function
  function zen_seo_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
        if (!isset($GLOBALS['seo_urls']) && !is_object($GLOBALS['seo_urls'])) {
            include_once(DIR_WS_CLASSES . 'seo.url.php');

            $GLOBALS['seo_urls'] = &new SEO_URL($_SESSION['languages_id']);
        }

        return $GLOBALS['seo_urls']->href_link($page, $parameters, $connection, $add_session_id, $static, $use_dir_ws_catalog);
  }

3.)In /admin/easypopulate.php find the following lines:

            // I'm only doing this for the first language, since right now froogle is US only.. Fix later! langer - is this still relevant?
            // adding url for froogle, but it should be available no matter what
            
                if ($num_of_langs == 1) {
                    $row['v_froogle_products_url_' . $lid] = zen_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $row['v_products_id']);
                } else {
                    $row['v_froogle_products_url_' . $lid] = zen_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $row['v_products_id'] . '&language=' . $lid);
                }
```4.)And replace them with the following:
        // I'm only doing this for the first language, since right now froogle is US only.. Fix later! langer - is this still relevant?
        // adding url for froogle, but it should be available no matter what
        
            if ($num_of_langs == 1) {
                $row['v_froogle_products_url_' . $lid] = zen_seo_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $row['v_products_id']);
            } else {
                $row['v_froogle_products_url_' . $lid] = zen_seo_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $row['v_products_id'] . '&language=' . $lid);
            }