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

YOU ARE HERE:
Get all section numbers

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Get all section numbers »
Welcome, Guest. Please Login or Register.
12/16/17 at 09:10:36
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Get all section numbers
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Get all section numbers  (Read 699 times)
mayur
Silver Dragon
***

Gender: male
Posts: 31




   

WWW E-Mail
Get all section numbers
« on: 09/17/07 at 12:47:26 »
Reply with quote Modify message

I've created a crude script which pulls a random number from a text file and inputs that into href and img tags to create a "random product" module of sorts.

I was wondering if there was a way to query cafepress and get ALL the section numbers for my store.  That way, I can dump them into the text file for processing.

I'm inputing them in the text file manually right now - with hundreds of sections, that'll take me a while.
Logged

http://desirage.com/
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Get all section numbers
« Reply #1 on: 09/17/07 at 12:52:21 »
Reply with quote Modify message

Two ways, neither terribly easy nor terribly difficult:

1. Setup your store ID in cpshop, configure the sidebar to show all subsections, then pull the section numbers out of the resulting sidebar HTML.

2. Search through the data files in the cpcache directory, and find the one that contains section information for your shop.  Download the file, give it a .csv extension, and open it in Excel.  Pull the section numbers out of the correct column.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
mayur
Silver Dragon
***

Gender: male
Posts: 31




   

WWW E-Mail
Re: Get all section numbers
« Reply #2 on: 09/17/07 at 14:03:18 »
Reply with quote Modify message

That worked great (the csv way), thanks!

I've used to set up a matrix of random images that goes under the product info on product pages with a header that says "products that may interest you"... yeah, I'm sure I could get something more dynamic using hooks to cross-selll but I have way to many products to bother with.

Logged

http://desirage.com/
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.