Jump to content

projman

Members
  • Content count

    30
  • Joined

  • Last visited

Everything posted by projman

  1. projman

    Article Manager v1.0

    Hi All, I am still looking on how to do this correctly. Has anyone done this berfore? Thanks!
  2. projman

    Article Manager v1.0

    I have a requirement to provide an expire date for each article, similure to the expiry date of a special product. Has anyone done this? And if so, would you share the code? Thanks!
  3. projman

    Google XML Sitemap SEO

    Jason, I found another error: Locate this line in the function: $lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added']; Change it back to the original line: $lastmod = $this->NotNull($result['last_mod']) ? $result['last_mod'] : $result['date_added']; If I find anything else, I will let you know, but it looks good now.
  4. projman

    Google XML Sitemap SEO

    Hi Jason, I think I fixed it - Try This: function GenerateProductSitemap(){ $sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_viewed as viewed FROM " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id) WHERE products_status='1' ORDER BY pd.products_viewed DESC"; if ( $products_query = $this->DB->Query($sql) ){ $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query); $container = array(); $number = 0; $top = 0; while( $result = $this->DB->FetchArray($products_query) ){ $top = max($top, $result['viewed']); $location = $this->hrefLink(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false); $lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added']; $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ; $ratio = $top > 0 ? $result['viewed']/$top : 0; $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); $container[] = array('loc' => htmlspecialchars(utf8_encode($location)), 'lastmod' => date ("Y-m-d", strtotime($lastmod)), 'changefreq' => $changefreq, 'priority' => $priority ); if ( sizeof($container) >= 50000 ){ $type = $number == 0 ? 'products' : 'products' . $number; $this->GenerateSitemap($container, $type); $container = array(); $number++; } } # end while $this->DB->Free($products_query); if ( sizeof($container) > 1 ) { $type = $number == 0 ? 'products' : 'products' . $number; return $this->GenerateSitemap($container, $type); } # end if } else { $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'false'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = '0'; } } # end function
  5. projman

    Google XML Sitemap SEO

    Jack Are you saying it might be a path problem becuase the full paths are not shown in the error? I removed the full path because I did not want to show them here on the forum. I will search and see what I can find. Everything was working fine until I wanted to change it to "Products Viewed". Thanks!
  6. projman

    Google XML Sitemap SEO

    Jack, Here is the error I am getting. Sorry I forgot to list it with the last reply: ERROR: Google Product Sitemap Generation FAILED! Write /sitemapcategories.xmlGenerated Google Category Sitemap Successfully Write /sitemapspecials.xmlGenerated Google Specials Sitemap Successfully Write /sitemapindex.xmlGenerated Google Sitemap Index Successfully Array ( [QUERY] => Array ( [PRODUCTS] => Array ( [sTATUS] => false [NUM_ROWS] => 0 ) [CATEOGRY] => Array ( [sTATUS] => success [NUM_ROWS] => 64 ) [sPECIALS] => Array ( [sTATUS] => success [NUM_ROWS] => 24 ) ) [sAVE_FILE_XML] => Array ( [0] => Array ( [file] => /sitemapcategories.xml [status] => success [file_exists] => true ) [1] => Array ( [file] => /sitemapspecials.xml [status] => success [file_exists] => true ) [2] => Array ( [file] => /sitemapindex.xml [status] => success [file_exists] => true ) ) )
  7. projman

    Google XML Sitemap SEO

    Hello Jack, Thank you for your help. I made a couple of other changes because I am getting an error. Would you take a look at the function below and see if you can see what is wrong please? Thanks Again! Jon function GenerateProductSitemap(){ $sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_viewed as viewed FROM " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id WHERE p.products_status='1' ORDER BY p.products_viewed DESC"; if ( $products_query = $this->DB->Query($sql) ){ $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query); $container = array(); $number = 0; $top = 0; while( $result = $this->DB->FetchArray($products_query) ){ $top = max($top, $result['viewed']); $location = $this->hrefLink(FILENAME_PRODUCT_INFO, 'p.products_id=' . $result['pID'], 'NONSSL', false); $lastmod = $this->NotNull($result['viewed']) ? $result['viewed'] : $result['date_added']; $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ; $ratio = $top > 0 ? $result['viewed']/$top : 0; $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); $container[] = array('loc' => htmlspecialchars(utf8_encode($location)), 'lastmod' => date ("Y-m-d", strtotime($lastmod)), 'changefreq' => $changefreq, 'priority' => $priority ); if ( sizeof($container) >= 50000 ){ $type = $number == 0 ? 'products' : 'products' . $number; $this->GenerateSitemap($container, $type); $container = array(); $number++; } } # end while $this->DB->Free($products_query); if ( sizeof($container) > 1 ) { $type = $number == 0 ? 'products' : 'products' . $number; return $this->GenerateSitemap($container, $type); } # end if } else { $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'false'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = '0'; } } # end function
  8. projman

    Google XML Sitemap SEO

    Hello Everyone and Jack, Our webiste is little different then most, and we would like to change the priority setting to use "Products Viewed" (like the products viewed report value) rather then "Products Ordered". Although I can code a little, I am not that great at it. Would someone help with this please? I don't want mess up the function GenerateProductsSitemap. I know this is where the change needs to take place, just could really use some help. Thank you, Jon
  9. projman

    Google XML Sitemap SEO

    I do not use or have any manufacturers. Is there an easy way to turn this off or where could I comment it out in the code? I might have to add some temp manufactures, but would perfer not to do this. Thank you,
  10. projman

    Header Tags SEO

    Jack, Thanks - I found the problem. The file is empty and when the auto add page function checks for new files and runs across a file which is blank/empty it will produce this error message. Maybe in the a future relaese you can check it the file is empty/blank before the add new file - just a suggestion. Thanks Again! Jon
  11. projman

    Header Tags SEO

    Hello - I believe the problem you found is in the table (layouts and tags) for the index.php and the product_info.php. I did all of my updates maunally following the instructions very close, but since I started with a 3rd party template I had to make a lot of re-write for most of the these tow files so that my site would not look bad. Take a look at the table tags and make sure that they will work with your site's codes: just in case, when I say table tags I am talking about things like: <tr> </tr> <td> </td> - things like that. There are so many templates out there... Other then that the contribution works great! Hope that helps some!
  12. projman

    Header Tags SEO

    Hi Jack, If I comment out lines in the admin/header_tags_seo.php the error goes away. Does this help to determine what is wrong? Thanks - Jon Here is what I commented out: /********************** RUN OPTIONS *********************/ // if (HEADER_TAGS_AUTO_ADD_PAGES == 'true') // $newfiles = AddMissingPages($languages_id, $languages); // else // $newfiles = GetFileList($languages_id); if (HEADER_TAGS_CHECK_TAGS == 'true') if (tep_not_null($missingTags = CheckForMissingTags())) $messageStack->add(ERROR_MISSING_TAGS . $missingTags); if (HEADER_TAGS_DIABLE_PERMISSION_WARNING == 'false') if (GetPermissions(DIR_FS_CATALOG_IMAGES) != Getpermissions($filename)) $messageStack->add(sprintf(ERROR_WRONG_PERMISSIONS, $filename, Getpermissions(DIR_WS_IMAGES)), 'error'); $optionPopup = array(); $commonPopup = array(); $defaultPopup = array(); $metatagsPopup = array(); if (HEADER_TAGS_DISPLAY_HELP_POPUPS) // { // $optionPopup = GetPopupText('option'); // $commonPopup = GetPopupText('common'); // $defaultPopup = GetPopupText('default'); // $metatagsPopup = GetPopupText('metatags'); // }
  13. projman

    Header Tags SEO

    One more thing: the phpinfo.php file is there it is just an empty file. What should it be?
  14. projman

    Header Tags SEO

    Hi All, I just installed this contribution and although everything went fine, I get an error at the top of my Admin page: Failed to open file: /public_html/phpinfo.php Anyone know how I may resolve this err message? Thank you, projman
  15. projman

    Article Manager v1.0

    Sorry the problem is a missing file: new_articles.php I cannot believe that this file has been missing since 2004. Is there a fix for this? I want the sub-topics to display under the main topic page?
  16. projman

    Article Manager v1.0

    Hi All, I looked for an anwser to this but did not find one: I have nested topoics with articles and although they are showing in the info_box the articels do not show up in the page. The code is not going past this if statement: if (isset($tPath) && strpos('_', $tPath)) { The above line is from the articles.php about line 120. Any ideas what might be wrong / why this if state is not working? Thank You!
  17. projman

    Article Manager v1.0

    I found a posting by elfstone - Posted on: Sep 9 2008, 01:36 PM - this fixed it? This should be in the contribution....
  18. projman

    Article Manager v1.0

    Patrick - Did you get this work? When I press on it, it does nothing as well???
  19. projman

    Article Manager v1.0

    Hi All - Sorry for asking this but i cannot find how to assoicate products with an article. Can anyone explain how to do this please? Thanks! Jon
  20. projman

    Sitemap SEO

    Jack - I found it! I had to change the file: "category_tree_no_product.php". Thank you for pointing me in the right direction.
  21. projman

    Sitemap SEO

    Thank you for the reply. I tried messing with these, but nothing seems to change. Even when I first installed it there was not indent of the sub-categories. Is there a setting/switch in the admin maybe that I have not seen? Any help would be great...
  22. projman

    Sitemap SEO

    Love this add-on. Everything works great! I do have one question: Is there a way to indent the sub-categories on each category? I am not a real programmer, but know enough to be dangerous, so any help would be great. Thank You!
×