marty.net message board
    About cpshop >> Customization Help >> Message started by: 7dave on 08/26/05 at 16:44:29

Title: Want to use cpshop.cgi.stores
Post by: 7dave on 08/13/05 at 15:41:34
I'm up to about 60 sections, and would like to manage them using a cpshop.cgi.stores file rather than the admin screen.  But I can't get it to work.

I've followed the instructions on the faq page.  I created the file in excel and converted it to a text file in the format specified in the faq file.  I named the file cpshop.cgi.stores and uploaded it to my cgi-bin/cpshop directory.  But it doesn't take.  The entries on the admin screen still come through.

Do I need to delete the entries on the admin page for this to work?  (I'm afraid to try this, because I'd have to re-enter everything if the cpshop.cgi.stores file still didn't work).

The only other thing I can think of is maybe I'm misunderstanding meaning of those four vertical strokes separating each entry.  Am I being really stupid and not realizing what they represent?

Thanks for any help.



Title: Re: Want to use cpshop.cgi.stores
Post by: Marty on 08/14/05 at 04:27:59
If you're having trouble with the file, try copying the store ID lines directly from your cpshop.cgi.config file (you'll notice them by the ||||'s), and then edit as you see fit.

And cpshop uses both the cpshop.cgi.stores file and the store IDs you enter into the admin screen.


Title: Re: Want to use cpshop.cgi.stores
Post by: 7dave on 08/14/05 at 13:01:50
The store ID lines in cpshop.cgi.config are full of gibberish--here's part of an example line:

mysite.123456||||Name||||%3Cb%3E%3Cfont%20size%3D%2B2%3

The extra characters are in the caption, keyword, and description fields for pretty much all of the store ID lines.

(modified to reduce the length of the example line)


Title: Re: Want to use cpshop.cgi.stores
Post by: Scottoons on 08/14/05 at 19:01:24
If the gibberish you are referring to is the %20 and other % numbers, those are actually web browser codes for spaces and other symbols. We browsers don't understand spaces so they replace them with codes that represent a space.


Title: Re: Want to use cpshop.cgi.stores
Post by: 7dave on 08/14/05 at 20:16:50
Yes, that's what I was referring to.

Is there a simple way for me, not being a browser, to understand and edit these things?

I know I'm being slow but I appreciate the help.


Title: Re: Want to use cpshop.cgi.stores
Post by: 7dave on 08/25/05 at 15:35:38
Hey Marty

I'm sure you're swamped with all the changes at Cafepress, but when you have a moment I'd appreciate it if you could toss out any other ideas-

I tried copying the lines from cpshop.cgi.config as you suggested, but they were full of extra characters which I now know are web browser codes for spaces and other symbols (thanks Scottoons), making it hard for me to work with them.

How can I avoid getting these browser codes? Any other ideas about what I might be doing wrong with cpshop.cgi.stores?

Thanks
Dave


Title: Re: Want to use cpshop.cgi.stores
Post by: Marty on 08/25/05 at 15:58:25
The "gibberish" is just URL-encoded text.

For example:
%3C is a <
%3E is a >
%20 is a space
%3D is a =
%2B is a "

So this:
<font size="2">

Becomes this:
%3Cfont%20size%3D%2B2%2B%3E

You can't really avoid getting the URL-encoded text -- cpshop will generate it automatically.

You can also just overwrite the lines with standard text, and it will likely work, as long as you a) keep everything on one line, and b) don't mess with the vertical bars.

And for reference, the fields, all separated by four ||||'s, is:
1. store ID list
2. name
3. description
4. meta keywords
5. meta description
6. alias

Which could look something like this (but all on one line):

mysite.1234 |||| My Section Name |||| This is the description |||| keyword, keywords |||| This is the meta description. |||| myalias

Or, without meta keywords or meta description:

mysite.1234 |||| My Section Name |||| This is the description |||| |||| |||| myalias


Title: Re: Want to use cpshop.cgi.stores
Post by: 7dave on 08/26/05 at 16:44:29
I made a new cpshop.cgi.stores from scratch, and lo and behold, it worked this time!

I'm still not sure what I was doing wrong before, but it works great now...thanks for your help Marty.



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.