Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
  • Activity
    Web development agency

Grosshandler22's Achievements


Newbie (1/14)



  1. I figured out how to change the image size of your products in PS 1.5.2 This version comes with the Feeder module which creates an automatice feed for your products. The images in the rss feed are by default, 45x45 px. This is a little small. If you would liek to change your image sizes then here is how. Please see the screen shot which shows you the available sizes which are already included in your system. In the admin backend under Preferences -> Images is the list of sizes. Please note the first entry which is "small_default" Now open up /modules/feeder/rss.php and go to the line which is the following: echo "<![CDATA[<img src='"._PS_BASE_URL_._THEME_PROD_DIR_.$imageObj->getExistingImgPath()."-small_default.jpg' title='".str_replace('&', '', $product['name'])."' alt='thumb' />"; THere are two properties which can be chaged here. First notice in that line the -small_default.jpg That is the part that controls the size. you can change it to any of the sizes which are available in the default list. I changed mine to -large_default.jpg Now for good SEO, notice in the sale line at the end the alt='thumb' /> The "thumb" is the default text which the search spiders see for every single pic. Change it to something short like maybe your site title. This is optional of course. Please keep in mind that you are rewriting the default php file here. If you do an update later, this may be overwritten and lost. Be sure to do your backups. Until PS provides a backend to make these changes yourself, this is the only way. You could of course spend >$50 on other modules that will do the same, but why? It is built in. Got questions, feel free to ask. rss.php
  2. I am new to Prestashop and am coming in on the 1.5.2 level. I am finding that there is a lot missing compared to the previous versions. I find this out only from research. For example I see that there is a possibiltiy of an RSS feed of products because the module exists for installation, but there is not a tab to configure this module. Researching the /modules/feeder/rss.php finds that the file is looking for values for $orderBy, $number and others. These are all important configuration fields for us end users, however, the 'Tools' tab is missing. In addition, the RSS does not even function. Submitting it to Google finds that it fails to validate. To fix this you must research all of the answers from past issues and then patch the original rss.php to get it to function and validate. Until there is the magical tool tab in the admin backend to configure this module, you will need to edit it directly. To get your RSS feed to validate you must make the following edits: line 31: To edit the number of items in your feed, you make change the 10 at the end of the line to your item count. $number = ((int)(Tools::getValue('n')) ? (int)(Tools::getValue('n')) : 10); line 43: <rss version="2.0"> is incorrect. This must be changed to <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> line 46: The description is missing. After line 46 you should add <description>DESCRIBE YOUR RSS FEED HERE</description> line 54: After the closing image tag </image> you must add the atom:link as so <atom:link href="<?php echo _PS_BASE_URL_.__PS_BASE_URI__.'modules/feeder/rss.php' ; ?>" rel="self" type="application/rss+xml" /> line 73 or 74 roughly: at the end of your file you shoudl find the line that is echo "\t\t\t<link><![CDATA[".htmlspecialchars($link->getproductLink($product['id_product'], $product['link_rewrite'], Category::getLinkRewrite((int)($product['id_category_default']), $cookie->id_lang))).$affiliate."]]></link>\n"; after that line, add the following line: echo "\t\t\t<guid><![CDATA[".htmlspecialchars($link->getproductLink($product['id_product'], $product['link_rewrite'], Category::getLinkRewrite((int)($product['id_category_default']), $cookie->id_lang))).$affiliate."]]></guid>\n"; After these few edits, your feed will function. Your product feed address is as follows: http://yourwebsite.com/modules/feeder/rss.php or feed://yourwebsite.com/modules/feeder/rss.php for some mail readers. For multi language websites, I have not figured out how to change the language of the feed yet. This should default to your original site language. I have attached my functioning rss.php file. You may of course simply use it to overright yours, but be sure to edit the DESCRIPTION at least to match your site. If you have any questions, please feel free to ask. Next I would like to work on the RSS theme a bit. rss.php
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More