Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


douglaswalker last won the day on July 26 2017

douglaswalker had the most liked content!


About douglaswalker

  • Birthday 04/30/1967

Profile Information

  • Real Name
  • Gender
  • Location
    Western Australia

Recent Profile Visitors

16,693 profile views
  1. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Thank-you that did the trick
  2. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    @BrockleyJohn not sure what i am doing wrong here. I will go through the steps again and write them here to see if anyone can spot the issue https://www.site.com.au/product_info.php?cPath=28& &(space here)products_id=71 is a link that google has picked up somewhere on the web. It has a space wrongly placed between cPath=28&(space here) products_id=71 This is creating the page to fail and try to redirect over and over. It ultimately needs to go to https://www.mysite.com.au/product-product--toy-p-71.html once it has passed through SEO urls program So I am trying to strip the space out of cPath=28&(space here) products_id=71 using htaccess RewriteRule ^([^\s%20]*)(?:\s|%20)+(.*)$ $1$2 [L,R] then send it on its way. However the htaccess is not working
  3. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    The htaccecss file works for urls like https://www.site.com/name-of-product(accidentalspace)-p-1000.html but not https://www.site.com/product_info?cPath=28&(spaceishere)products_id=1000 I thought it should remove the incorrect space and then the program takes over and redirects to the properly formed url
  4. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    The htaccess bit I couldnt get to work. i placed it above all the other code. It goes to page not working. could it be this bit as i don't want to add just remove # replace spaces by - in between RewriteRule ^([^\s%20]*)(?:\s|%20)+(.*)$ $1-$2 [L,R]
  5. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Thanks so much for this I re-coded the shopping cart header module using the code from the column box module so avoided sprintf public function getOutput() { GLOBAL $cart, $currencies, $PHP_SELF; $cart_contents_string = ''; if ($cart->count_contents() > 0) { $cart_contents_string = NULL; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $cart_contents_string .= '<li>'; $cart_contents_string .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;'; $cart_contents_string .= $products[$i]['name']; $cart_contents_string .= '</a></li>'; } } and then called <?php echo $cart_contents_string; ?> in the template file will sort out the htaccess part you have offered when the site is a bit quieter
  6. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    The other question I have is over the years a few people have linked to the site incorrectly leaving a white space in the url which becomes %20 is there a way to use htaccess or any other method to strip out any whitespaces before any other redirects happen. The url in question is https://www.site.com/product_info?cPath=28&(spaceishere)products_id=1000
  7. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Hi there I did as suggested and the name disappeared from the drop down and was not replaced by the word test. Url was a typo but the link that currently shows is https://www.site.com.au/-p-700.html
  8. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Hi there I found a curious issue when this addon is used with a navbar drop down cart in the header. The urls of the products in the cart drop down look like this https://www.site.com.au/-p-700.html instead of https://www.site.com.au/name-of-product/-p-700.html The code to create the cart in the navbar is standard <?php $products = $cart->get_products(); foreach ($products as $k => $v) { echo '<li>' . sprintf(MODULE_NAVBAR_SHOPPING_CART_PRODUCT, $v['id'], $v['quantity'], $v['name']) . '</li>'; } ?> and the language file define('MODULE_NAVBAR_SHOPPING_CART_PRODUCT', '<a href="' . tep_href_link('product_info.php', 'products_id=%s') . '">%s x %s</a>'); Just wondered why this is?
  9. douglaswalker

    [Addon] Modular Navigation Bar (Bootstrap)

    I got around the checking product numbers by creating an on / off in the categories listing using this addon. https://forums.oscommerce.com/topic/318434-contribution-hide-categories-products/?page=1 It means I have to manually turn the category on and off but that is ok Then all I had to do was in the category class was check if the category was 1 or 0 if anyone is interested more than happy to share the code.
  10. douglaswalker

    [Addon] Modular Navigation Bar (Bootstrap)

    Hi there @kymation I use you modular navigation code.. and use the simple drop down categories module. I am trying to find a way to not show a category in the drop down if there are no products in the category. I thought that the way to do this must be somewhere in the category class... Would you know how to do this (can it be done) or give me an idea of how. i know there are contributions for it but they deal with very different code. many thanks Doug
  11. douglaswalker


    Hi there hoping to pick the brains of SEO interested people here. Breadcrumbs currently show as Home > Page you came from > page you are on Or something similar. The schema picks all this up and it passes the schema test at Google. However the page you are on is shown as a link in the breadcrumb.. so in effect it is just linking to it's self. Is this ok for SEO... many things I have read say a page linking to itself is not such a good idea. So my question is if I don't want it to be a link and just plain text how can i do this and still have it pass the schema test. I know I can just change the breadcrumb link in the code and remove the tep_href part but then the schema doesn't pass as the breadcrumb relies on a function to produce the correctly formatted schema and that relies on the link anyway any thoughts? schema function <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class breadcrumb { var $_trail; function breadcrumb() { $this->reset(); } function reset() { $this->_trail = array(); } function add($title, $link = '') { $this->_trail[] = array('title' => $title, 'link' => $link); } function trail($separator = NULL) { $pos = 1; $trail_string = '<ol itemscope itemtype="http://schema.org/BreadcrumbList" class="breadcrumb">'; for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) { if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) { $trail_string .= '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="' . $this->_trail[$i]['link'] . '" itemprop="item"><span itemprop="name">' . $this->_trail[$i]['title'] . '</span></a>'; } else { $trail_string .= '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">' . $this->_trail[$i]['title'] . '</span>'; } $trail_string .= '<meta itemprop="position" content="' . (int)$pos . '" /></li>' . PHP_EOL; $pos++; } $trail_string .= '</ol>'; return $trail_string; } } ?> code on page to call function $breadcrumb->add('Policies', tep_href_link('policies.php')); $breadcrumb->add('AfterPay', tep_href_link('afterpay.php'));
  12. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Please ignore the post above @Jack_mcs solution is absolutely right. I made a mistake with the URL. Thanks all for your help
  13. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    @Jack_mcs I tried the above(with my site details) but it goes to a page not found.. i tried turning off your header redirect still goes to stock page not found.. reset seo cache still page not found.. It is ignoring the 301... weird
  14. douglaswalker

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    @Hotclutch the redirect does not work if the product is in the database and turned off or deleted from the database. I have tested all possibilities. it just appends the product_info part to the end of the url deeply annoying