marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
How to generate a sitemap using cpshop

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « How to generate a sitemap using cpshop »
Welcome, Guest. Please Login or Register.
12/14/17 at 02:30:26
Home Help Search Login Register
   marty.net message board
   About cpshop
   Tutorials
   How to generate a sitemap using cpshop
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: How to generate a sitemap using cpshop  (Read 1608 times)
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
How to generate a sitemap using cpshop
« on: 07/20/08 at 09:56:45 »
Reply with quote Modify message

WARNING: I've extracted the following from a working installation, but haven't tested the "tutorial" below.

First create a new instance of cpshop, that is, copy all the cpshop.* files to something like sitemap.*

Now open sitemap.cgi and replace the if ($hacked) code with the following:


Code:
$hacked = 1;

if ($hacked) {

   &gettemplate;
     
           # set the <[linksrc]> URL to point to our actual store
           # replace cpshop.cgi with the filename of your actual store cgi
     $content =~ s/sitemaps.cgi\?i=/cpshop.cgi\//gi;
     
   $html =~ s/<\[content\]>/$content/;
           
   unless (@ARGV) {
       print "Content-Type: text/html\n\n";
   }
   print $html;

     exit;

} else {


Next open up cpadmin.cgi and select sitemap.cgi from the pulldown.

Set Default HTML template (and all other templates) to


Code:
/server/path/to/your/template/blankTemplate.html


This is what the template should look like:


Code:
<[content]>


Set the Thumbnail Grid Layouts for sections and products to:


Code:
<[linksrc]><br />


Next, for Display Thumbnail Grid Table Wrapper Code? Click "NO" and make sure the before and after fields are blank.

Finally, in the storeid section create one or more storeids that will generate lists of products and sections. eg:


Code:
criticalgraphic/1162845.all


And give each an alias.

NOTE: If you've got a big store, trying to generate a sitemap with a single alias might cause cpshop to fail -- it wasn't intended to display the contents of an entire store on a single page.  What you'll need to do is create aliases for sub-sections of your store and then put them together manually (though a clever shopowner could automate the process...).

After you've created the template just open your new sitemap shop in your browser using the URL.


Code:
http://www.yourshop.com/cgi-bin/sitemap.cgi?i=your_alias


Now just copy the page text and save it to a file. Repeat this for each alias, concatenating each onto the last and you've got your sitemap.

« Last Edit: 07/20/08 at 09:59:31 by Hex Angel - Patrick » Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.