[Module] Froogle Static export
Posted: Tue Jun 30, 2009 12:40 pm
Title: "Froogle Static" export
Author: Martin Smallridge (WebSnail)
License: Opensource
Cost: Free
Version: 1.0.5 (revision 87)
Compatible: 4.0.x / 5.0.0 - 5.0.x
New Version (1.1.0 -> )
Title: "Froogle Static" export
Author: Martin Smallridge (WebSnail)
Cost: Paid
Purchasing: SnailSolutions
Version: 1.1.0 (revision 242)
Compatible: 6.x
This little module was cooked up by simply stripping a lot of the "are you allowed" code and interface info on progress from the admin export function for froogle.
What does it do
This module simply exports your entire product list into a Froogle/GoogleBase friendly format using a static filename (instead of the dynamic one created in the admin version) so you can tell Google to grab this regularly.
If you set a CRON job (ie: scheduled task) to run the froogle.php file your file will be automatically re-generated according to the schedule you set.
Security Issues?
It does mean that your entire product catalogue can be easily downloaded by a competitor, etc...
This is by no means perfect as someone with a lot of time could potentially use a brute force method to find the file but you can edit the class.froogle.php file and change the $exportFile variable to something a bit more obscure
eg: $exportFile = "DU32_ccvEds238DF.xml";
NB: Remember to included the .xml file extension or it will not be interpreted properly by google.
So, long as you give Google the correct full path and filename you should be fine.
How to install
Copy the two files into your existing Interspire installation
What to pass on to Froogle/GoogleBase
The URL for your product list will be
http://yoursite.url/[store_directory?]/cache/froogle-export.xml
If you've changed the value for $exportFile you will need to put that value in place of "froogle-export.xml"
eg: http://yoursite.url/[store_directory?]/cache/DU32_ccvEds238DF.xml
Setup CRON
Ref: http://www.modwest.com/help/kb5-125.html
/home/foo/public_html/froogle.php
Changelog
Author: Martin Smallridge (WebSnail)
License: Opensource
Cost: Free
Version: 1.0.5 (revision 87)
Compatible: 4.0.x / 5.0.0 - 5.0.x
New Version (1.1.0 -> )
Title: "Froogle Static" export
Author: Martin Smallridge (WebSnail)
Cost: Paid
Purchasing: SnailSolutions
Version: 1.1.0 (revision 242)
Compatible: 6.x
This little module was cooked up by simply stripping a lot of the "are you allowed" code and interface info on progress from the admin export function for froogle.
What does it do
This module simply exports your entire product list into a Froogle/GoogleBase friendly format using a static filename (instead of the dynamic one created in the admin version) so you can tell Google to grab this regularly.
If you set a CRON job (ie: scheduled task) to run the froogle.php file your file will be automatically re-generated according to the schedule you set.
Security Issues?
It does mean that your entire product catalogue can be easily downloaded by a competitor, etc...
This is by no means perfect as someone with a lot of time could potentially use a brute force method to find the file but you can edit the class.froogle.php file and change the $exportFile variable to something a bit more obscure
eg: $exportFile = "DU32_ccvEds238DF.xml";
NB: Remember to included the .xml file extension or it will not be interpreted properly by google.
So, long as you give Google the correct full path and filename you should be fine.
How to install
Copy the two files into your existing Interspire installation
- \froogle.php
- \includes\classes\class.froogle.php
What to pass on to Froogle/GoogleBase
The URL for your product list will be
http://yoursite.url/[store_directory?]/cache/froogle-export.xml
If you've changed the value for $exportFile you will need to put that value in place of "froogle-export.xml"
eg: http://yoursite.url/[store_directory?]/cache/DU32_ccvEds238DF.xml
Setup CRON
Ref: http://www.modwest.com/help/kb5-125.html
You need to set the path to the file properly so if you have a hosting account of "foo" with your store in the main/root directory you'd use this path:If your PHP scripts do not have executable permissions, 644 or -rw-r--r-- for example, then as part of the command portion of the cron line, you must specify the php interpreter and pass it the filename of the PHP script (including full path to the script from your home directory) that you want executed, like so:
The first cron line above will run myscript.phtml located in your home directory every day at 2:28PM.Code: Select all
28 14 * * * /usr/local/bin/php -q /home/account/public_html/store/froogle.php
/home/foo/public_html/froogle.php
Changelog
- 1.0.5 : Revision 87:
- GBP, EUR and USD specific lists now created
- exportFile remains as before for default currency
- skips any currencies that don't exist
- Prepends other currency files with the currency code eg: USD_froogle-export.xml
- No other changes necessary
- 1.0.4 : Revision 34:
- Update changes from ISC 4.0.9 that provide the "condition" field
- Default "condition" field to "new" if the condition field in database is not present or set (ie: backwards compatibility)
- Add $show_quantity option to show inventory quantities (set to true by default)
- Hide Quantity attribute for any items with a zero stock level even if $show_quantity is set to true
- 1.0.3 : Revision 31:
- Duplicate product list now optional using $ignore_duplicates variable in class.froogle.php
- Summary attribute/tag deprecated in favour of Description (as per documentation rather than out of date example on GoogleBase)
- Weight attribute/tag added for any products with weights set
- Tidied up formatting to produce a clean XML output
- More informative comments to help with editing, etc..
- 1.0.2 : Revision 29:
- Code now strips out duplicate product listings so that products only appear once instead of multiple times (if in multiple categories)
- Added revision, author and date information to make it easier to track changes
- 1.0.1 : Revision X:
- Fix invalid path issue when calling froogle from the CRON
- 1.0.0 : Revision X:
- Initial release