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

YOU ARE HERE:
Drop Down Box by Type Cheat Sheet =)

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Drop Down Box by Type Cheat Sheet =) »
Welcome, Guest. Please Login or Register.
12/13/17 at 17:02:06
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Drop Down Box by Type Cheat Sheet =)
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Drop Down Box by Type Cheat Sheet =)  (Read 5699 times)
lovethetroops
Silver Dragon
***

Gender: female
Posts: 47



Support our Troops!
   

Drop Down Box by Type Cheat Sheet =)
« on: 10/10/05 at 09:42:45 »
Reply with quote Modify message

As a coding newbie I decided to post what I have learned to do, hoping to help others that may be in the same boat.  Below is what is needed to apply filters and have a drop down box in your CPshop.  You can change the Name and Alias to suit your personal tastes but you must change the html code down below to reflect the filters too.  Not all products Cafepress has are listed here.  I only used the items that are most appealing to my customer base.  

Wildcard: xxx.all (replace the xxx with your store id, like mine is lovethetroops.all)

Store ID: *,cpfilter_type: (Prod#)

Prod#      Name                  Alias

105      Keepsakes (Oval)      oval_keepsake
124      Keepsakes (Rnd)            round_keepsake
112      Value T-Shirts            valuetshirts
2      White T-Shirts            whitetshirts
102      Jr. Raglan Ts            jrraglan
113      Jr. Ringer Ts            jrringers
6      Jr. BabyDoll Ts            babydoll
89      Womens White Ts            womenswhite
134      Women's Cap Sleeve      capsleeve
114       Womens Tanks            womenstanktops
109      Womens Pink Ts            womenspink
45      Golf Shirts            golfshirts
7      Ash Grey Ts            ashgreytshirts
107      Yellow T-shirts            yellowtshirts
126      Ringer T-Shirts            ringer
115      Sleeveless Shirts      sleevelesstshirts
106      Fitted T-Shirts            fittedtshirts
111      Organic T-Shirts      organic
87      Camisoles            camisoles
80      Thongs                  thong
15      Boxers                  boxer
38      Baseball Jerseys      baseballjerseys
5      Long Sleeve Ts            longsleevetshirts
4      Sweatshirts            sweatshirts
23      Hooded Swtshirts      hoodedsweatshirts
103      Jr. Hoodies            jrhoodies
128      Raglan Hoodies            raglanhoodies
129      Women's Tracksuit      tracksuits
72      Infant Creeper            infantcreeper
69      Toddler T-Shirt            infanttoddler
70      Kids T-Shirt            kidstshirt
136      Kids Jersey            kidsjersey
135      Kids Sweatshirt            kidssweatshirt
133      Kids Hoodie            kidshoodie
52      License Frames            licenseframes
90      Bumper Stickers            bumperstickers
51      Oval Stickers            ovalstickers
101      Trucker Hats            truckerhats
17      Tote Bags            totebags
118      Buttons                  buttons
119      Magnets                  magnets
125      Throw Pillows            throwpillows
86      Keepsake Boxes            tileboxes
147      Framed Tiles            framedtiles
77      Postcards            postcards
78      Greeting Cards            greetingcards
100      Blank Journals            journals
49      Large Mugs            largemugs
0      Mugs                  mugs
42      Aprons                  aprons
3      Mousepads            mousepads
26      Teddy Bears            teddybears
110      Dog T-Shirts            dogtshirts
131      Custom Postage            custompostage
« Last Edit: 10/10/05 at 09:47:14 by lovethetroops » Logged
lovethetroops
Silver Dragon
***

Gender: female
Posts: 47



Support our Troops!
   

Re: Drop Down Box by Type Cheat Sheet =)
« Reply #1 on: 10/10/05 at 09:44:53 »
Reply with quote Modify message

Below is the code for a drop down box to display your items by products...
Just change the " ?" to your domain and the "---" to your path for CPshop.cgi or index.cgi or what ever you use to get your CPshop to kick in and then add to your template.  Copy and paste into your notepad to edit. =)

<center><form>
<select onChange="location=this.options[this.selectedIndex].value;">
<option value="">Browse by Product</option>
<option value="">- - - - - - - -</option>
<option value="http://www. ?.com/---/---.cgi/oval_keepsake">Keepsakes (Oval)</option>
<option value="http://www. ?.com/---/---.cgi/round_keepsake">Keepsakes (Rnd)</option>
<option value="">- - - - - - - -</option>
<option value="http://www. ?.com/---/---.cgi/valuetshirts">Value T-Shirts</option>
<option value="http://www. ?.com/---/---.cgi/whitetshirts">White T-Shirts</option>
<option value="http://www. ?.com/---/---.cgi/jrraglan">Jr. Raglan Ts</option>
<option value="http://www. ?.com/---/---.cgi/jrringers">Jr. Ringer Ts</option>
<option value="http://www. ?.com/---/---.cgi/babydoll">Jr. Baby Doll Ts</option>
<option value="http://www. ?.com/---/---.cgi/womenswhite">Womens White Ts</option>
<option value="http://www. ?.com/---/---.cgi/capsleeve">Women's Cap Sleeve</option>
<option value="http://www. ?.com/---/---.cgi/womenstanktops">Womens Tanks</option>
<option value="http://www. ?.com/---/---.cgi/womenspink">Womens Pink Ts</option>
<option value="http://www. ?.com/---/---.cgi/golfshirts">Golf Shirts</option>
<option value="http://www. ?.com/---/---.cgi/ashgreytshirts">Ash Grey Ts</option>
<option value="http://www. ?.com/---/---.cgi/yellowtshirts">Yellow T-Shirts</option>
<option value="http://www. ?.com/---/---.cgi/ringer">Ringer T-Shirts</option>
<option value="http://www. ?.com/---/---.cgi/sleevelesstshirts">Sleeveless Shirts</option>
<option value="http://www. ?.com/---/---.cgi/fittedtshirts">Fitted T-Shirts</option>
<option value="http://www. ?.com/---/---.cgi/organic">Organic T-Shirts</option>
<option value="http://www. ?.com/---/---.cgi/camisoles">Camisoles</option>
<option value="http://www. ?.com/---/---.cgi/thong">Thongs</option>
<option value="http://www. ?.com/---/---.cgi/boxer">Boxers</option>
<option value="">- - - - - - - -</option>
<option value="http://www. ?.com/---/---.cgi/baseballjerseys">Baseball Jerseys</option>
<option value="http://www. ?.com/---/---.cgi/longsleevetshirts">Long Sleeve Ts</option>
<option value="http://www. ?.com/---/---.cgi/sweatshirts">Sweatshirts</option>
<option value="http://www. ?.com/---/---.cgi/hoodedsweatshirts">Hooded Swtshirts</option>
<option value="http://www. ?.com/---/---.cgi/jrhoodies">Jr. Hoodies</option>
<option value="http://www. ?.com/---/---.cgi/raglanhoodies">Raglan Hoodies</option>
<option value="http://www. ?.com/---/---.cgi/tracksuits">Women's Tracksuit</option>
<option value="">- - - - -  - - -</option>
<option value="http://www. ?.com/---/---.cgi/infantcreeper">Infant Creeper</option>
<option value="http://www. ?.com/---/---.cgi/infanttoddler">Toddler T-Shirt</option>
<option value="http://www. ?.com/---/---.cgi/kidstshirt">Kids T-Shirt</option>
<option value="http://www. ?.com/---/---.cgi/kidsjersey">Kids Jersey</option>
<option value="http://www. ?.com/---/---.cgi/kidssweatshirt">Kids Sweatshirt</option>
<option value="http://www. ?.com/---/---.cgi/kidshoodie">Kids Hoodie</option>
« Last Edit: 10/10/05 at 09:48:29 by lovethetroops » Logged
lovethetroops
Silver Dragon
***

Gender: female
Posts: 47



Support our Troops!
   

Re: Drop Down Box by Type Cheat Sheet =)
« Reply #2 on: 10/10/05 at 09:45:38 »
Reply with quote Modify message

<option value="">- - - - - - - -</option>
<option value="http://www. ?.com/---/---.cgi/licenseframes">License Frames</option>
<option value="http://www. ?.com/---/---.cgi/bumperstickers">Bumper Stickers</option>
<option value="http://www. ?.com/---/---.cgi/ovalstickers">Oval Stickers</option>
<option value="http://www. ?.com/---/---.cgi/truckerhats">Trucker Hats</option>
<option value="http://www. ?.com/---/---.cgi/totebags">Tote Bags</option>
<option value="http://www. ?.com/---/---.cgi/buttons">Buttons</option>
<option value="http://www. ?.com/---/---.cgi/magnets">Magnets</option>
<option value="http://www. ?.com/---/---.cgi/throwpillows">Throw Pillows</option>
<option value="http://www. ?.com/---/---.cgi/tileboxes">Keepsake Boxes</option>
<option value="http://www. ?.com/---/---.cgi/framedtiles">Framed Tiles</option>
<option value="http://www. ?.com/---/---.cgi/postcards">Postcards</option>
<option value="http://www. ?.com/---/---.cgi/greetingcards">Greeting Cards</option>
<option value="http://www. ?.com/---/---.cgi/journals">Blank Journals</option>
<option value="http://www. ?.com/---/---.cgi/clocks">Wall Clocks</option>
<option value="http://www. ?.com/---/---.cgi/largemugs">Large Mugs</option>
<option value="http://www. ?.com/---/---.cgi/mugs">Mugs</option>
<option value="http://www. ?.com/---/---.cgi/aprons">Aprons</option>
<option value="http://www. ?.com/---/---.cgi/mousepads">Mousepads</option>
<option value="http://www. ?.com/---/---.cgi/teddybears">Teddy Bears</option>
<option value="http://www. ?.com/---/---.cgi/dogtshirts">Dog T-Shirts</option>
<option value="http://www. ?.com/---/---.cgi/custompostage">Custom Postage</option>
</select>
</form>
</center>


I hope that you learn from this as much as I have, although probably not due to me just giving you this, but anyway if you

want posters added you will have to figure it out yourself but if you have paid attention you probably get the idea.

If there are any errors, please forgive them. ;)

Kim
http://www.lovethetroops.com
Logged
Tony
Gold Dragon
****

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #3 on: 10/10/05 at 17:25:39 »
Reply with quote Modify message

That's cool, I was going over my list of products as well the other night to clean up how I used to get the product types.  I had to keep looking up the numbers.  I kind of organized them differently, but you can see it them in my dropdown (not a form one, my nav up top) and on this product page:

http://www.astphotos.com/store/browse.php

Good to keep that list of numbers around!
Logged

----------------
http://www.astphotos.com
lovethetroops
Silver Dragon
***

Gender: female
Posts: 47



Support our Troops!
   

Re: Drop Down Box by Type Cheat Sheet =)
« Reply #4 on: 10/11/05 at 12:38:00 »
Reply with quote Modify message

WOW!  I like the way you did that.  It fits on the page so nicely and I did not even have to scroll.  Much more organized.  But for the newbie the drop down box is about all I can handle at this time.  I took a look at the source code and my eyes crossed.  I could not figure it out for the life of me.  But great job, and I love Boston.  My husband grew up in Dedham.  And all of his family now lives in Attleboro =)

Kim
Logged
Tony
Gold Dragon
****

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #5 on: 10/11/05 at 16:17:54 »
Reply with quote Modify message

Thanks  It actually took longer to make all the filters than anything else, but now with the cpfilter_type, it's so much nicer.  I just went through every product and made a filter for it in cpshop

* - astphotos.all

*,cpfilter_type:0
alias: all_mugs

etc, and then even made groups, like combining all the ones for shirts into an all_unisex_shirts filter.  That took a very long time mind you, but I thought it would be worth it.  Plus, once it's all done, you're pretty much set you know?    A few updates here and there as cafepress makes more products.  Then you just make links to them

Anyway, feel free to take a look at the code whenever, I'm still sorting out what's best for people as they browse

And glad to hear you enjoy Boston as well!  I have had many inner conflicts and some with my friends here as well seeing that I'm actually a NY'er that moved to Boston
Logged

----------------
http://www.astphotos.com
Shawn - Pristine Photo
Gold Dragon
****

Gender: male
Posts: 89




   

WWW
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #6 on: 10/11/05 at 17:39:22 »
Reply with quote Modify message

They're just jealous because an outsider could show the beauty of their city and love for their city better than they could Tony...  They'll get over it and if they don't... *shrugs* oh well! :p

And Kim, my eyes crossed when I first looked at Tony's code too.  That was way back when I started working with cpshop.  I did a couple of pages doing something similar but ended up scrapping them temporarilly.  I'm hoping to get back to using it again soon tho..  Just need to figure out some how toos in order to get exactly what I want out of it. heh

Awesome share on the pulldown code tho.  Have had some folks asking how to do that in the Great Gear forums. And btw, I love your designs Kim!  Keep up the awesome work.
Logged

Shawn
Pristine Photography
mabillings
Silver Dragon
***

Posts: 36



Go Scots!
   

E-Mail
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #7 on: 10/12/05 at 04:48:06 »
Reply with quote Modify message

"But great job, and I love Boston.  My husband grew up in Dedham.  And all of his family now lives in Attleboro =)"

Born in Cambridge and raised on the South Shore myself Ah, I miss the ocean...
Logged
buda
White Dragon
**

Gender: male
Posts: 23



Let's Gooooo......... Mountaineers!
   

WWW
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #8 on: 04/08/06 at 13:00:03 »
Reply with quote Modify message

I need some help with this.I've tried to make this work..but can't. I don't understand the wildcards ie..what they are and what they do?

I am an affiliate and do not have my own cp store. I use cpshop to tie several stores together.

Here is what's go on...

The dropdown menu works fine but when I click on a product (white tee shirts) it takes me to a page with no products.

When i click on a store image on my homepage. it takes me to the white shirt...not to the full store page with all the store products like it should.

I would put the store link up so you could see what it is doing.. but i had to get it working again.. so i stopped using the menu and just have the store images up. I can try to duplicate it and repost with the link if i need to.

Logged

buda
http://www.schoolbusdepot.net
http://www.truckergifts.net
buda
White Dragon
**

Gender: male
Posts: 23



Let's Gooooo......... Mountaineers!
   

WWW
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #9 on: 04/08/06 at 22:15:31 »
Reply with quote Modify message

Got it working! This is great. Thank you soooo much lovethetroops. I know this took a long time to work out and you are very kind to share.
Logged

buda
http://www.schoolbusdepot.net
http://www.truckergifts.net
cjsherlock
Silver Dragon
***

Posts: 42



I'd Rather Be Diving!
   

WWW
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #10 on: 10/23/06 at 08:55:57 »
Reply with quote Modify message

How does one find the
Prod# and Name?  
Since CP has added the Dark shirts I would like to add those to my drop down list...
I also would like to add other products as they become avail...So where on CafePress does one find this Information...Also where do you find out where on the CP site is thier thumbnail for the product?

Thanks
Christopher
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Drop Down Box by Type Cheat Sheet =)
« Reply #11 on: 10/23/06 at 09:58:46 »
Reply with quote Modify message

http://www.cafepress.com/cp/info/sell/products/viewall

Click on any product, and the product type number is in the URL.  For example:

Dark T-Shirt:
http://www.cafepress.com/cp/info/sell/products/productdetail?prodtypeno=152

So the dark t-shirt is product type 152.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
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.