Home > Tutorials > Wordpress > ZStore Helper WordPress Plugin For Zazzle Store Builder
Permalink to ZStore Helper WordPress Plugin For Zazzle Store Builder

ZStore Helper WordPress Plugin For Zazzle Store Builder

by on 03.23.2009 | 492 comments

Update: 6/11/2011 Now includes all the currently available products as of the date above. Fixed a blocking bug. Thank you to Webgrrl for reporting it. [...]

Update: 6/11/2011

Now includes all the currently available products as of the date above. Fixed a blocking bug. Thank you to Webgrrl for reporting it.

So a few members of Zazzle.com asked me to make a plugin for WordPress to make it easier to install the Zazzle Store Builder into WordPress. Usually it is quite easy, but for a novice coder placing it into WordPress can be a pain since it requires some special workarounds to be done. So to make it easy for people using WordPress I’ve made a plugin. I have asked the permission of Zazzle to release it and have now gotten permission, the only requirement is that you have download the Zazzle Store Builder from their website as you have to be a member & accept their terms & conditions to use it.

How Do I Install It?

Right here we go, the instuctions are as follows:

  1. Download the plugin (can be found at the bottom of this post.)
  2. Download the Zazzle Store Builder from here.
  3. Unzip the contents of the plugin (zstore-helper.zip) to the wp-content/plugins folder in your WP installation.
  4. Go to wp-content/plugins/zstore-helper/zstore which should be empty. Open the Zazzle Store Builder zip file. Go into the folder you can see & drag out the includes & css folders into the zstore folder. See figure 1 for what your directory should look like.
  5. Make sure that you have fancy permalinks enabled. So your URLs don’t have ?p=34 in them, the plugin will not work without this due to Zazzle’s store bulder code.
  6. Now go into your WordPress admin. Head to the plugins section & turn on the Zstore Helper plugin. Next head to the Zstore Helper options page that will appear under Settings & set some global options. These are the options that will always be run, unless you over ride them (more on that later).
  7. Once you’ve set the global options all you need to do is make a page or post & put [zstore] into it. Publish & your store will appear. :)

Options

Here is a list of the options available on the options page & detailed instructions on what they do:

Contributor Handle
The store name (generally shown in the URL of your store’s homepage) of the store you wish to show products from.
Associate ID
An ID used for referrals. Found under the associates center, which can be found in the gallery tab of MyZazzle.
Product Line ID
Allows you to display a specific product line. Leave blank to show all products from a gallery. The product line ID can be found by clicking on a product line in a gallery. The URL will look something like http://www.zazzle.com/coatsofarms/products/cg-196595220567583981. The string or numbers on the end is the product line ID.
Product Type
Exactly what it says. Restrict which type of product is shown from the gallery.
Keywords
Also exactly what it says. Restrict products returned from the gallery by a keyword. Comma seperated. Eg. Cat, star, cow. You get the idea.
Grid Width
How wide, in pixels, should the complete product grid be. Although this is in pixels you do not need the px on the end, just the number.
Grid Cell Size
The size of each grid cell. Just pick a size from the list.
Grid Cell Spacing
The space, again in pixels, between each grid cell. As before although the value is in pixels only the number is needed & not px.
Grid Cell Background Color
The color used for each grid cells background color. In HEX but without the hash(#). Eg. FFFFFF is white. For a list of HEX colors try this link. You want the 6 char string under the column ‘Hex’.
Use Google Analytics
If you want to use Google Analytics then set this to true & then fill in Google Analytics Number with your UA number from your Google Analytics account. If you already have a Google Analytics plugin running on WordPress you probably won’t need this.
Google Analytics Number (ID)
If you set the last option to true then this is where you put your Google Analytics Number. It looks like this: UA-xxxxxxx-x. If you already have a Google Analytics plugin running on WordPress you probably won’t need this.
Show How Many Products
How many products do you want to show per page, or if you have pagination turned off, how many do you want to show in total. Default is 20. It is generally not a good idea to set this above 100 or 150 as it could crash older computers while trying to load all the images.
Starting Page
What page of results do you want to start on.
Show Pagination
Do you want to show a pagination. A pagination is the list of numbers that represent links to other pages if there are too many products to show on the first page.
Show Sorting
Do you want to show the sorting options. This allows visitors to sort by the Date Created or Popularity if set to true.
Default Sorting
What you want the products to be sorted by, Date Created or Popularity. Applies even if Show Sorting is set to false.
Show ‘By’ Line
Do you want to show the products ‘By’ line. This is the line that says ‘by zazzlestore’. In other words do you want to show which store created the product.
Show Product Title
Pretty obvious. Do you want to show the products’ title.
Show Product Price
Again obvious. Do you want to show the products’ price.
Enable Caching
Do you want to enable caching. This helps reduce server load for both you and Zazzle since it saves the images it uses so it doesn’t have to contact Zazzle everytime. Handy if you get a lot of visitors.
Cache Lifetime
How long before the cache is deleted & a new set of images is retrieved from Zazzle. This is in seconds. (3600 seconds = 1 hour)

Shortcode Over-rides

Here is a list, with examples, of the attributes used for over-rides. They are similar to HTML attributes so HTML users should feel right at home. Their uses match the options above so refer to the list above for any explanations.

contributorhandle
Example: [zstore contributorhandle="ZazzleStore"]
associateid
Example: [zstore associateid="THEASSOCIATEID"]
productlineid
Example: [zstore productlineid="THEPRODUCTLINEID"]
producttype
Example: [zstore producttype="cards"]. You may use the three digit code or the name of a product from this list.
keywords
Example: [zstore keywords="cats"]. A list of keywords if more than one is used they must be comma(,) seperated.
gridwidth
Example: [zstore gridwidth="400"]
gridcellsize
Example: [zstore gridcellsize="medium"]. This must match either tiny, small, medium, large or huge.
gridcellspacing
Example: [zstore gridcellspacing="5"]
gridcellbgcolor
Example: [zstore gridcellbgcolor="FFFFFF"]
useanalytics
Example: [zstore useanalytics="false"]. Options are true or false.
analyticsid
Example: [zstore analyticsid="UA-xxxxxxx-x"]
showhowmany
Example: [zstore showhowmany="20"]
startpage
Example: [zstore startpage="1"]
showpagination
Example: [zstore showpagination="true"]. Options are true or false.
showsorting
Example: [zstore showsorting="true"]. Options are true or false
defaultsort
Example: [zstore defaultsort="date_created"]. Options are date_created or popularity.
showproductdescription
Example: [zstore showproductdescription="true"]. Options are true or false.
showbyline
Example: [zstore showbyline="ZazzleStore"]. Options are true or false.
showproducttitle
Example: [zstore showproducttitle="true"]. Options are true or false.
showproductprice
Example: [zstore showproductprice="true"]. Options are true or false.
usecaching
Example: [zstore usecaching="false"]. Options are true or false
cachelifetime
Example: [zstore cachelifetime="3600"]. Length in seconds.

You can use any of these in combination like this: [zstore contributorhandle="ZazzleStore" producttype="Mugs" keywords="cats, dogs"].

Product Type List

This is the list of product types for use with the producttype Shortcode attribute. They are the same as those listed in the drop down box on the options page, this list is here just for reference. Also they are case-insensitive.

  • Bumper Stickers
  • Cards
  • Mousepads
  • Buttons
  • Keychains
  • Magnets
  • Hats
  • Bags
  • Ties
  • Photo Sculptures
  • Aprons
  • Photo Prints
  • Calendars
  • Keds Shoes
  • Mugs
  • Postage
  • Skateboards
  • Stickers
  • Posters
  • Embroidered Shirts
  • Embroidered Bags
  • Embroidered Hats
  • T-Shirts
  • Postcards
  • Profile Cards
  • Binder
  • Pet Apparel
  • Invitations
  • Letterhead
  • Stationery
  • Flyers
  • Rackcards
  • Photo Cards
  • Envelopes
  • Labels
  • Ornaments
  • iPad/iPhone Cases
  • Coasters

Where Can I Download This Marvelous Invention?


Right here. Just click here to download the zip. Then jump back up to the top and follow the instructions carefully.

What About WordPress MU?

Well after a little bit of adjustments it will work in WPMU. You can download that version here. This version is only a mu-plugin if you want to use it as a normal plugin in WPMU then download the version above & place it in your plugins folder.

I Wanna See It Working!

Sorry the example is broken because of my theme. It’ll be back as soon as I can fix the theme.

Written by Paul Robinson

A Web coder in languages such as CSS, X/HTML, jQuery, but mostly PHP. Addicted to Girls Aloud, Jennifer Morrison, Carah Faye Charnow, TV Show Chuck, and completely in love with Yvonne Strahovski's smile.

Give something back!

If you LOVED this tutorial and would like to show your appreciation, please consider or a little something from our Amazon Wishlist.

Discussion: 492 Comments

  1. Sep 9th, 2011 @ 21:54:12

    First off, Great plugin! I’m glad I found it. I was wondering if you are going to do any updates? Do you think it is possible to make it where you can have different feeds on different pages. Like have a Shoes feed on one page [zstore1] and T-Shirts on another page [zstore2].
    Once again Great Job!


    • Sep 9th, 2011 @ 23:11:50

      Hi Rob,

      I’m not sure I understand. You can already do that by using the inline parameters in the shortcode. For example:

      [zstore keywords="shoes"]
      

    • Sep 10th, 2011 @ 16:21:37

      Hi Paul,
      Thanks for pointing that out. I guess I was too excited that it worked and did not finish reading everything. I’m new to zazzle and wordpress. Great plugin – thanks again.


    • Sep 10th, 2011 @ 16:29:53

      Don’t worry about it. ;)

      Glad it’s helped you.


  2. Sep 10th, 2011 @ 02:14:33

    I see a lot of request about the product show page once clicked on. Yes it is a part of 1.5 whenever it releases. ive been playing with it close to a year now so its definitely in the release, so is having twitter with the page, other products you have(customizable), bread trail so you can always backup or reverse to stay in your store, plus the buttons and product page are customizable to a certain extent in the new css files.
    Now, when zazzle is going to release this I dont know. I know there working on some other things to go along with it, and I think but dont know for sure, want to wait till all the bulk of the new product roll outs are done first also. The ability is there now to do it with API, but wont be for the zsb till 1.5 is officially released.


    • Sep 10th, 2011 @ 12:23:36

      I’ve played with some of the features, but due to all the additions (specifically the need for .htaccess) it destroys most, if not all, possibilities of it working inside WordPress. There would be too many conflicts.

      That’s not to say I’m not going to try, but I’d rather wait until 1.5 is released officially since there may be last minute changes made to the code.


  3. Sep 10th, 2011 @ 13:56:13

    I use the Zazzle Storebuilder on three different websites, and two of them are WordPress. A lot of people use WordPress. Surely ZSB wouldn’t delete a big portion of their users? At that point I’d have to hope that the existing version of ZSB would keep on working. Your ZStore helper by the way is AWESOME.


    • Sep 10th, 2011 @ 16:33:14

      Hi Sharon,

      I’m not sure. Like I said I’m waiting until the full version of 1.5 is released, but from looking at previews it looks as if it could be possible that it won’t work in WordPress.

      There might be a way to implement it in some fashion, but I’m not sure it would be the same as it is now.

      The current version should be fine even after the release of 1.5, so you should be fine to keep using it.

      Thank you. Glad it’s been useful for you. :)


  4. Oct 6th, 2011 @ 13:34:02

    Thank you for the plugin and clear instructions. I found it easy to use and was successful with “open in new window” after removing analytics coding (as others suggested).

    I know someone touched earlier on SEO duplicate content and pagination. I found this 2011 discussion: http://www.seroundtable.com/google-pagination-solution-14037.html

    I think this plugin falls in category two since we don’t have view all, but can you confirm that the rel=”next” and rel=”prev” are already in the coding or let us know what we should do to add it or a way to add “view all”?

    Also, the article says ” Google still wants you to differentiate the pages with unique page titles but this way they know all the ranking juices flow to the same pages, typically the first page.”

    How do I give the pagination pages different titles? Or do they mean all related pagination pgs should have 1 title, and the next set a different title title, and so on?

    Thank you again for all your time and effort,
    Tracy


    • Oct 6th, 2011 @ 14:21:32

      Hi Tracy,

      You would have to hack into the Zazzle Store Builder files like you did to add in the ‘open in new window’ code. You would probably need to look for any point at which the variable $pagination is assigned to in any way, and look for the next & prev links.

      I think those links may be repeated once of twice, but I know there is one on line 321 of the unmodified version of the zstore.php file. The line number may be different if you’ve added modifications to if already.

      The page titles is not impossible, but extremely unlikely as WordPress controls the page title & without heavy modification the Zstore file can’t effect that.

      Hope that helps.


  5. Oct 6th, 2011 @ 14:33:12

    Thank you for the quick reply.

    Yes, I did note the first option: “Outlining your options – Here are three options for a series:
    -[1]Leave whatever you have exactly as-is. …”

    But, I wanted to hear your thoughts on it as well. As I learn more, maybe I will venture into the coding but for now, it seems there is no need for immediate action.

    thank you again,
    Tracy


    • Oct 6th, 2011 @ 14:42:35

      No problem.

      Personally I think Google seems to be intelligent enough to figure out what is duplicate content (purposeful) and duplicate content through the randomness of dynamic information.

      Although to be quite honest I don’t think anyone but Google knows exactly what Google looks for, lol.


  6. Oct 24th, 2011 @ 20:29:52

    Hey Paul, new problems, I think? I upgraded all the ZBlogs to 3.2, it has a new multi user admin situation. Anyhoos, now zstore helper doesnt appear in the settings section for subdomain zblogs setup. I can see it as master admin, but they cannot see it when they login to their admin.
    Any idea’s as to why it’s not working now?
    Thanks
    Bill


    • Oct 24th, 2011 @ 22:53:19

      Hi Bill,

      On my test MU install (running 3.2.1) I have the Zstore plugin inside the mu-plugins folder, and I can see it under each site as a site admin, but I can’t see it as a Network admin.


    • Oct 24th, 2011 @ 22:57:23

      Oh, and I’ve just tried it in the normal plugin folder & using the network activate. That also seems to allow it to appear to the site admin of all sites, but again not the network admin.


  7. Oct 24th, 2011 @ 23:00:18

    And im having the opposite problem. So I went into a users site using their login, and sure enough the link isnt in the settings section.
    Ive tried it in both the muplugins and standard plugins.
    Im using subdomains too in case that makes a difference.
    It works great on the primary site, just none of the subs.
    Hmmm
    I would hate to have to switch back to wishads


  8. Oct 24th, 2011 @ 23:46:32

    Would it be any easier to modify the wishads plugin to use pagenation since thats its major drawback. I had gotten permission from Jim the owner of wishads to modify as needed back when zblogs first got started. Maybe a combination plugin between the two. Couldnt put it out for general use, but maybe can get that later too since he’s dropped any support for it.
    Bill


    • Oct 25th, 2011 @ 01:53:18

      The problem with Wishads is that it’s basically the Zazzle Store Builder. I have a copy of it on my HDD and other than the fact it has WordPress code in it, it’s pretty much the same.

      If I had the time I would make a version of the Store Builder for WP from scratch using the new XML parsing features of PHP 5. It would run a lot faster & be much more efficient, I just haven’t been able to find the time to do it.

      I’m still stumped at why your WP MU won’t show the plugin though. It shows fine on my local install. I have two, one setup for folder domains & one setup for subdomains. They are fake of course with them being local, but the local DNS resolution should make it pretty much identical to the ‘real’ internet. :(


  9. Nov 1st, 2011 @ 02:56:46

    Hello Paul,
    I have been using your plugin for a long time now and it has worked flawlessly. However I just discovered a problem with next arrows or next numbers not working, they just bring up page one. You can see the problem here:
    http://zazzledazzlers.com/the-vintage-vamp/
    I have updated all the files with your latest version. Any help would be much appreciated.
    Doug


    • Nov 1st, 2011 @ 11:24:47

      I know im not Paul but here is a suggestion for ya. There have been issue’s popping up all over the place since all the zazzle changes and this is something that has worked for a lot of them. (first make a backup of your site pages)
      Now, just to ck, delete out the cofig and css files for the plugin and replace them with a fresh new set with no alterations. I know some of you like to add to the config file, but just to ck that this is going to work, first just upload a fresh new copy from the zazzle site.(not an old copy from a folder on desktop either) This has worked quite often for whatever reason, but if not, next try completely removing the plugin files, replace the zsb parts of it, then reupload it completely.(of course make sure and deactivate it on the site)-make sure you have a db backup too.
      Bill


    • Nov 1st, 2011 @ 12:17:29

      Thanks for helping out Bill, much appreciated.

      Doug, I would follow Bill’s suggestion first to make sure there is nothing going wrong in your ZSB files. If that still doesn’t help drop back & I’ll help you out ASAP. ;)


    • Nov 1st, 2011 @ 17:46:30

      Hello Bill,
      Thanks for the help. Yes I tried changing all the files like I did on TheVintageVamp.com site but it did not help. So today I uninstalled everything including zstore helper and the zsb files. Downloaded new one of both and unloaded activated them and still have the exact same problem. I have not tweaked anything at all have just left all setting to default you can see what is going on here. Just will not leave first page of products.
      http://zazzledazzlers.com/the-vintage-vamp/
      I also have several other zstore helpers on this site also, all do the same thing??
      Doug


    • Nov 1st, 2011 @ 23:11:41

      It’s a very odd problem you’ve got. I can’t think of any reason for that to happen. It seems to be completely ignoring the URL parameters that tell it to change the page.

      The only way to tell what is going on would be to manually debug it. Are you able to give me admin access so I can try to see what is going on? If you can drop me an email via my contact form & I’ll try and get the problem fixed tomorrow for you.


    • Nov 1st, 2011 @ 23:26:54

      Thanks Paul,
      I just sent you an email with the info. Let me know if you don’t get it.
      Doug


  10. Nov 4th, 2011 @ 14:58:21

    Just wondering if yall figured anything out on this next page issue. Ive just setup two new blogs and having the same issue now. Plus 3 help request from others that are having this same issue. Then I have some that are working fine including my own site using the setup exactly the same way.
    Bill


  11. Nov 4th, 2011 @ 15:01:48

    Wait a minute, might have just found the issue. “Permalinks”, if set on custom or set on default seem to be a hit and miss if the pages work or not. I tried setting to “day and name” and now the pagenation works. At least on the 3 sites ive made the change on.
    Woot………..maybe?


    • Nov 4th, 2011 @ 15:07:10

      Hmm. No never did figure it out. The strange thing was the the URL parameters sent by the server were missing if you tried to access them. Still haven’t figured out why.

      I do know that the ZSB won’t work without fancy/pretty permalink so the ?p=xxxx style permalinks won’t work. Not sure why custom permalinks won’t though. Maybe something to do with the way WordPress parses the URLs, something about it strips URL parameters so they are no longer accessable? I haven’t a clue unfortunately.


  12. Nov 5th, 2011 @ 03:28:22

    I have my custom permalinks set up as %postname% and I’m not having any trouble with pagination…
    ( http://verycoolcases.com/shop-of-the-month/ )

    I am however, having trouble with the drop-down menu for ‘Product Type’. I try to choose ‘iPad/iPhone Cases’ and when I hit the button to ‘update options’ it always changes to Product Type: Postage.

    I’m hoping it’s a minor fix, would you be able to check into that sometime soon?

    Loving the plugin, by the way Paul! My site would be nothing without it!

    Thanks so much!


    • Nov 5th, 2011 @ 13:13:15

      Hi Jessica,

      Thank you for the kind words. Glad to help out. Keep an eye out for the premium version that’s coming soon, don’t worry though the free version ain’t going anywhere.

      There was a problem in the plugin itself I’ve corrected it and added the new products Zazzle now have available. The new version is downloadable from the same link as before.

      Hope it helps, let me know if the problem persists.


  13. Nov 5th, 2011 @ 12:13:52

    Its been a hit and miss issue with about 50% of the people, all started happening since all the zazzle changes.
    Now for the drop down, this is not a fix, but to get you by for now you can just put the product type in the shortcode….
    [zstore contributorhandle="shopname" producttype="iPad/iPhone Cases"]


    • Nov 5th, 2011 @ 13:16:42

      Thanks Bill. Turned out I made a mistake in the file. Should be all fixed in the new version.


  14. Nov 5th, 2011 @ 14:19:25

    Wow, woke up this morning to 8 emails with the same new problem. So I break out my main site and test site and im having the same issue. Here is whats happening, nothing shows in posts anymore.
    Well not really, if you go directly to a post listing with a direct link like so.. http://www.fishts.com/2011/11/05/add-your-catchs-weight-to-tshirt-at-fishts/ then it works great, but if you try to show your posts on main page or any other page they do not show as evident at this link….. http://www.fishts.com/news/
    The products and images also will not show up if the user has their settings/reading set to show latest posts as the main page.
    Regular pages still work with no problems.
    Ive tried every permalink setting and option, every page option, url options, cache options, and a few other things that could or may interferre with links. No changes to any of these sites overnight, no server changes, no updates of any kind…at least that im aware of.


    • Nov 5th, 2011 @ 14:38:28

      Hey Bill.

      Any chance you can give me admin access to that site? I’d love to have a little poke around & see if I can find out what the problem is there.

      Drop me an email with access in if you can. I have an idea, but need to confirm it before I can start shouting it from rooftops.


  15. Nov 6th, 2011 @ 11:26:21

    Ok, i tried few things, and then uninstalled the plugin and refreshed and re installed new files from both zip files……and the problem STILL there.. I cannot access the plug in via the WP Settings on the left column. Im using WP 3.2.1 – all was ok before i added the newest zip (3/11/2011)

    prior to that i believe the plug in i used was with product up to Necklaces (so it was a while back)

    Appreciate a clue please (till then i had to go into the WP Plugin Edit section to configure settings, but i would like to not have to do that each time i want to edit a setting, thanks..


    • Nov 6th, 2011 @ 11:59:00

      Hi Webgrrl,

      You are indeed correct. Just checked it out on my test install & it’s missing. I don’t know why since that part of the code wasn’t altered. but I’m on it now & will have it fixed ASAP.

      Just a quick note, we are having stability problems with the server at the minute. It keeps running through it’s entire allocation of memory extremely quickly so if the site goes down please just wait about 3-4 minutes and then refresh. Sorry, we are trying to fix it as quickly as possible.


    • Nov 6th, 2011 @ 12:07:45

      Should be all fixed now if you download the new zip file & install over the top. Thanks for letting me know about the problem. :)


    • Nov 6th, 2011 @ 12:18:32

      Thanks Paul for quick response! I will wait for the fix.. and while i have your attention, i have a question that i been wanting to know for a while..

      Is there a way to update the plugin without having to reinstall each time there is new products, so that i dont lose any of the edits that i have done (eg: Open in new window etc). I am pretty sure i read it somewhere while ago, but i cant seem to find that solution anymore..

      Thank You again, for your wonderful work..you are a life saver :)


    • Nov 6th, 2011 @ 12:33:55

      Fix should be available on the same zip now. The only way I know is to overwrite the files on the server using the old fashioned method of FTPing into your server and overwriting the old files that way.

      I keep meaning to add in an auto updater that I found a little while ago, but it requires a stable server & at the minute ours is a little bit unstable with the memory problems. I’ll try & add it as soon as that’s sorted though.


    • Nov 6th, 2011 @ 13:12:52

      Thanks again! I have undated and its all going good.. So nice to see it back in the Settings..i missed it! LOL!

      Yes im an oldie and actually still do my plugin installs via FTP – always like to know another way i can access/see files – i’ve been dabbling with WP since 2001..and we all know she’s (WP) have come a long long way since then.. ;)


    • Nov 6th, 2011 @ 16:48:06

      Ahh good news. :)

      Indeed she has. The auto update I have in mind uses the core WP functions for it’s own updater, it just contacts this server instead of WP’s SVN server. I’m just making sure we’ve solved our stability problems before I add it in. ;)


    • Nov 7th, 2011 @ 01:35:44

      Excellent! Would so good to have that..

      *funny i was looking for a thumbs up/like button against your comment..haha! but THUMBS UP and SUPER LIKE!!


    • Nov 7th, 2011 @ 17:16:21

      Yep. I’m hoping to have it in the next version, not too sure when that will be though. Early next year I hope, maybe December if I don’t get swamped by work again.

      Nope, there’s no Facebook style thumbs up/down buttons here. :)


Leave a comment

Please enclose code in [lang] tags. For example [php] echo 'hello world'; [/php]

* Name, Email, Comment are Required