Site builder customisation
edaldridge
Posted: Saturday, November 07, 2009 1:57:12 AM

Groups: Member

Joined: 8/26/2009
Posts: 9
Hi

I have a problem customising my store builder, I am trying to get it set up to display different categories in my store but with the code below it doesn't separate it into separate grids. What do I use as the contributer handle?

Any ideas?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>Zazzle Store Builder: Sample page with top 5 most popular</title>
          <link id="ext_css" rel="stylesheet" type="text/css" href="css/zstore.css"/>
         <body>
<h1 class="sampleTitle">Bigrat Design Studio</h1>

<?php


// configure Zazzle Store Builder display
$_GET[‘contributorHandle’] = “Art/abstract”;
$_GET[‘productLineId’] = ‘196938172531274049’;
$_GET[‘showPagination’] = ‘false’;
$_GET[‘showSorting’] = ‘false’;
$_GET[‘showProductDescription’] = ‘true’;
$_GET[‘showByLine’] = ‘false’;
$_GET[‘showProductTitle’] = ‘false’;
$_GET[‘showProductPrice’] = ‘false’;
$_GET[‘gridCellSize’] = ‘small’;
$_GET[‘showHowMany’] = ‘16’;

include "include/zstore.php";

// configure Zazzle Store Builder display
$_GET[‘contributorHandle’] = “Photography”;
$_GET[‘productLineId’] = ‘196273536250931593’;
$_GET[‘showPagination’] = ‘false’;
$_GET[‘showSorting’] = ‘false’;
$_GET[‘showProductDescription’] = ‘false’;
$_GET[‘showByLine’] = ‘false’;
$_GET[‘showProductTitle’] = ‘false’;
$_GET[‘showProductPrice’] = ‘false’;
$_GET[‘gridCellSize’] = ‘small’;
$_GET[‘showHowMany’] = ‘16’;

include “include/zstore.php”;

?>

</body>
</html>
LisaMarieArt
Posted: Saturday, November 07, 2009 2:59:58 AM

Groups: Member

Joined: 7/4/2008
Posts: 721
Location: Oop North
It's probably because it can't detect the contributorHandle

You need to enter the name of a specific store in that part, or leave it blank if you want to use the entire marketplace. So for example it would be $_GET['contributorHandle'] = 'edaldridge'; if you wanted to pull in products from your store.

You would need to use $_GET['keywords'] = 'photography'; for example, if you want to pull in products using the tag photography.

From what I can make of the code you have, do you want to create grids for each section within your store? I.e, Photography grid, Art/Abstract grid, etc.

If so then you can set the contributorHandle in your configuration.php file if you haven't already. (line 12 ish, in the includes folder) Just enter your store name between the quotes.

The PHP you'll need on your page should be something like this providing you have set your store name in the configuration.php file. Just add the contributorHandle line I used above if you don't want to set it in the configuration.php file.


Quote:

<?php

// For your Paper Abstract category grid

// configure Zazzle Store Builder display
$_GET[‘productLineId’] = ‘196938172531274049’;
$_GET[‘showPagination’] = ‘false’;
$_GET[‘showSorting’] = ‘false’;
$_GET[‘showProductDescription’] = ‘true’;
$_GET[‘showByLine’] = ‘false’;
$_GET[‘showProductTitle’] = ‘false’;
$_GET[‘showProductPrice’] = ‘false’;
$_GET[‘gridCellSize’] = ‘small’;
$_GET[‘showHowMany’] = ‘16’;

include "include/zstore.php";

// For your Paper Photography category grid

// configure Zazzle Store Builder display
$_GET[‘productLineId’] = ‘196273536250931593’;
$_GET[‘showPagination’] = ‘false’;
$_GET[‘showSorting’] = ‘false’;
$_GET[‘showProductDescription’] = ‘false’;
$_GET[‘showByLine’] = ‘false’;
$_GET[‘showProductTitle’] = ‘false’;
$_GET[‘showProductPrice’] = ‘false’;
$_GET[‘gridCellSize’] = ‘small’;
$_GET[‘showHowMany’] = ‘16’;

include “include/zstore.php”;

?>


As you are using actual categories (product lines) to section off your products, you only need the productLineId and don't need to worry about the keywords which I mentioned earlier.

If you want to add text between your grids just break the PHP and reinitialize it after the text. You do this by putting ?> <?php after the first 'include' line and putting your HTML between the 2. It should look something like this:


Quote:
$_GET[‘showHowMany’] = ‘16’;

include "include/zstore.php";

?>

<hl>Header here</h1>
<p>Paragraph here</p>

<?php

// For your Paper Photography category grid

// configure Zazzle Store Builder display
$_GET[‘productLineId’] = ‘196273536250931593’;


Hope this helpsSmile

edaldridge
Posted: Saturday, November 07, 2009 7:02:41 AM

Groups: Member

Joined: 8/26/2009
Posts: 9
Hi Lisa

Ok, so my code now looks like below, my contributer handle was set up in the config.php but my site still shows all products rather than just the two sections in the paper category.

Where am I going wrong??

Here is the site Bigrat Design Site

Code:
<?php

// For your Paper Abstract category grid

// configure Zazzle Store Builder display
$_GET['keywords'] = 'Art/abstract';
$_GET[‘productLineId’] = ‘196938172531274049’;
$_GET[‘showPagination’] = ‘false’;
$_GET[‘showSorting’] = ‘false’;
$_GET[‘showProductDescription’] = ‘true’;
$_GET[‘showByLine’] = ‘false’;
$_GET[‘showProductTitle’] = ‘false’;
$_GET[‘showProductPrice’] = ‘false’;
$_GET[‘gridCellSize’] = ‘small’;
$_GET[‘showHowMany’] = ‘16’;

include "include/zstore.php";

// For your Paper Photography category grid

// configure Zazzle Store Builder display
$_GET['keywords'] = 'photography';
$_GET[‘productLineId’] = ‘196273536250931593’;
$_GET[‘showPagination’] = ‘false’;
$_GET[‘showSorting’] = ‘false’;
$_GET[‘showProductDescription’] = ‘false’;
$_GET[‘showByLine’] = ‘false’;
$_GET[‘showProductTitle’] = ‘false’;
$_GET[‘showProductPrice’] = ‘false’;
$_GET[‘gridCellSize’] = ‘small’;
$_GET[‘showHowMany’] = ‘16’;

include “include/zstore.php”;


Thanks for your help!
Ed
LisaMarieArt
Posted: Saturday, November 07, 2009 7:18:13 AM

Groups: Member

Joined: 7/4/2008
Posts: 721
Location: Oop North
It's probably the / in the 1st keyword parameter. Try deleting the first keyword line, or just use one word. Unfortunately we can't use more than one keyword.

I've looked in your zazzle store and you have your Paper Abstract in one product line and your Paper Photography in another so you don't need the keyword parameter anyway. As long as you aren't going to delete those 2 product lines from your store, or you add non-related items to them, then there's no need to use keywords.
edaldridge
Posted: Saturday, November 07, 2009 7:34:41 AM

Groups: Member

Joined: 8/26/2009
Posts: 9
I tried that and it displayed the same as before. not sure what I am missing...could it be the contributerHandle is wrong? I've used edaldridge as that is the name that appears on the url www.zazzle.com/edaldridge
LisaMarieArt
Posted: Saturday, November 07, 2009 9:03:53 AM

Groups: Member

Joined: 7/4/2008
Posts: 721
Location: Oop North
Yup that's right. The contributorHandle is whatever appears after the main Zazzle URL.

I'm totally baffled. The only thing I can suggest is to strip it right down to see if you can get it to work. Maybe start with only one grid and only a few parameters, then try and add the second grid with the same few paramters and see if it works. If it does keep adding until it breaks.

On the other hand, it might be something in your configuration.php file but as PHP is not visable after it has executed I can't tell.

I'll keep digging around and see what I can come up with in the meantime.
FishTsdotcom
Posted: Saturday, November 07, 2009 9:47:03 AM
 Zazzle Proseller
Groups: ProSeller

Joined: 2/27/2008
Posts: 1,789
Location: Pascagoula
Maybe it just got cut off in your post but, be sure you have closed the php tags for each section.

Dont include both choices in one php section, but make it two sections. (this will verify it pulls each section)

example...
<?

store display feed information

?>

then repeat it for the second one directly below that one,

<?

store display feed information

?>

each with its own enclosed php brackets. Dont include the letters php either, just the ? and the < and > brackets. Its automatically assumed that <? is php.

Cant leave it open ended like you can with html either.

Bill






LisaMarieArt
Posted: Saturday, November 07, 2009 10:39:07 AM

Groups: Member

Joined: 7/4/2008
Posts: 721
Location: Oop North
That was my next thought Bill but you beat me to it!

Seperate the two out into seperate PHP section like Bill says, and put some HTML inbetween so that you can see what is going on more clearly. I have a feeling though that it might be that you haven't closed your PHP tag.

It would be more practical to split into seperate sections anyway because you're going to need some form of HTML and text inbetween so the customer knows what they're looking at.

Also using <? ?> without the php is classed as short code and not all servers have short code enabled. If you don't know it's better to leave them on... start with <?php ... and end it with ?>. I use the long version all the time and it causes me no problems.
edaldridge
Posted: Saturday, November 07, 2009 2:34:11 PM

Groups: Member

Joined: 8/26/2009
Posts: 9
Thanks for all the help so far, I am still getting it displaying all the products in no particular order, here is the latest sample of the index php code, this contains just one grid with one product line I can't figure out what is going on with this at all...if you need me to post the config.php so you can look at it please let me know?


Code:
<?php

// For your Paper Abstract category grid

// configure Zazzle Store Builder display
$_GET[‘productLineId’] = ‘196938172531274049’;
$_GET[‘showPagination’] = ‘false’;
$_GET[‘showSorting’] = ‘false’;
$_GET[‘showProductDescription’] = ‘false’;
$_GET[‘showByLine’] = ‘false’;
$_GET[‘showProductTitle’] = ‘false’;
$_GET[‘showProductPrice’] = ‘false’;
$_GET[‘gridCellSize’] = ‘small’;
$_GET[‘showHowMany’] = ‘16’;

include "include/zstore.php";

?>

AlRioArt
Posted: Saturday, November 07, 2009 2:51:30 PM

Groups: Member

Joined: 6/3/2009
Posts: 383
edaldridge wrote:
.if you need me to post the config.php so you can look at it please let me know?


Please do.
FNolan
Posted: Saturday, November 07, 2009 3:00:44 PM

Groups: Member

Joined: 5/12/2008
Posts: 2,131
Where did you get your productLineId number from ? If you check the link on your Zazzle site it should be - 196174992659242263 and not the number 196938172531274049. If you use a number that's not the right one I assume the feed will default to showing everything. Just a thought in the way my warped mind works Smile

EDIT: Nevermind, I see where you got your number from, from the sub catagory Art/Abstract. Grin
edaldridge
Posted: Saturday, November 07, 2009 11:59:05 PM

Groups: Member

Joined: 8/26/2009
Posts: 9
Here is the config file
Code:
<?php
/* *****************************************************/
/*         USER CONFIGURABLE VARIABLES FOR ZSTORE 1.0.2  */
/* ****************************************************/

/***************************************************/
/*    REQUIRED VARIABLES   */
/*  You must replace the values for these variables  */
/****************************************************/       
// Your Zazzle contributor name. Enter your contributor name to feature products from your gallery exclusively
// or leave blank (remove "zazzle") to pull a feed from the Zazzle Marketplace.
$contributorHandle = "edaldridge";

// Your Zazzle Associate ID
$associateId = "**********";

/****************************************************/
/*   OPTIONAL VARIABLES  */
/* You may change these variables to suit your gallery design  */
/****************************************************/

// The numeric code for the Zazzle product line to display. If you want to show all products from a gallery, leave this blank. 
// To get a product line number, click on a product line in a gallery.  In the URL you will see something like this:
// http://www.zazzle.com/coatsofarms/products/cg-196595220567583981.  The string of numbers at the end is the product line ID.
// Leave this blank if you are pulling Zazzle Marketplace feeds.
$productLineId = "";

// Product type filter. You can use this variable to limit display to only one type of product (t-shirts, mugs, etc)
// Just enter one of the numeric Product Codes below. If you leave this variable blank, all product types are displayed:
// 128 Bumper Sticker
// 137 Card
// 144 Mouse pad
// 145 Button
// 146 Keychain
// 147 Magnet
// 148 Hat
// 149 Bag
// 151 Tie
// 153 Photo Sculpture
// 154 Apron
// 156 Photo Print
// 158 Calendar
// 167 Keds Shoes
// 168 Mug
// 172 Postage Stamps
// 186 Skateboards
// 217 Sticker
// 228 Print (posters)
// 231 Embroidered shirts
// 232 Embroidered bags
// 233 Embroidered hats
// 235 T-Shirt
// 239 Postcards
// 240 Profile Card
$productType = "";

// Search terms.  Comma separated keywords you can use to select products for your store.
// Entering keywords is especially useful when pulling Zazzle Marketplace feeds.
// If you use a Marketplace feed and do not enter one or more keywords, all products from Zazzle.com
// are returned, though not all at once.
$keywords = "";

// Grid width: Set the overall width of your product grid (in pixels).
$gridWidth = "900";

// The size you want each grid cell (product square) - choices:  tiny, small, medium, large or huge
$gridCellSize = "large";

// Grid cell spacing: The space between products in the product grid (in pixels).
$gridCellSpacing = "9";

// Background color of grid images in HEX (without the #, for example, "FFFFFF" for white)
$gridCellBgColor = "FFFFFF";

// If you have a Google Analytics account and you want to use it in your Zazzle Store, say true. Otherwise say false.
$useAnalytics = 'false';

// Your Google Analytics code.  This variable is ignored if useAnalytics is set to false.
$analyticsId = "YOUROWNANALYTICSCODENUMBERHERE";

// Change just the number in quotes. This is how many results you want returned per page.
$showHowMany = !isset($_GET['ps']) ? "20" : $_GET['ps'];

// Change just the number in quotes. The page of your gallery products you want to be the first displayed in your Zazzle Store
// (example, start showing products from page 5 of the result set)
$startPage = !isset($_GET['pg']) ? "1" : $_GET['pg'];

// Show pagination controls (true or false).  These are the page numbers, <---Prev, and Next ---> used to move around in a gallery or Zazzle Store.
$showPagination = true;

// Show sorting controls (true or false).  If true, controls are displayed allowing buyers to sort products by Recent (date created) or Popular (number sold). 
// If false, no sort controls are displayed and products are displayed according to the value of defaultSort.
$showSorting = true;

// How should we be sorting by default? options are 'date_created' or 'popularity' for sort by popularity.
$defaultSort = 'date_created';
       
// Show short product description beneath the product image (true or false).
// Note: the description appears beneath the title if the title is enabled.
$showProductDescription = true;

// Show creator "by" line.  True or false.
$showByLine = true;

// Show product title. True or false.
$showProductTitle = true;

// Show product price.  If false, no price is displayed for products in your Zazzle Store.
$showProductPrice = true;
       
// Enable or disable image caching (true or false).
$useCaching = false;
       
// How long to keep cached resources (if useCaching is enabled) in seconds.  3600 seconds = 1 hour
$cacheLifetime = 7200;         

       
/* ******************************************* */

?>

edaldridge
Posted: Monday, November 09, 2009 3:02:48 AM

Groups: Member

Joined: 8/26/2009
Posts: 9
Ok, doing a bit more checking around, the problem appears to be that the index.php is not pulling the product line ID correctly, I have another Store Builder site on a different website and using the existing template I added in the product line ID variable and although it displays the number of products correctly (25) it doesn't display the right category, please can you look at the code below and see if you can spot any errors??

Code:
<?php

// configure Zazzle Store Builder display
$_GET['useCaching'] = 'false';
$_GET['showPagination'] = 'false';
$_GET['showSorting'] = 'false';
$_GET['gridCellSize'] = 'medium';
$_GET['showHowMany'] = '5';
$_GET['defaultSort'] = 'popularity';

include "include/zstore.php";
?>

<?php

// configure Zazzle Store Builder display
$_GET[‘productLineId’] = ‘196938172531274049’;
$_GET['showPagination'] = 'false';
$_GET['showSorting'] = 'false';
$_GET['showProductDescription'] = 'false';
$_GET['showByLine'] = 'false';
$_GET['showProductTitle'] = 'false';
$_GET['showProductPrice'] = 'false';
$_GET['gridCellSize'] = 'small';
$_GET['defaultSort'] = 'date_created';
$_GET['showHowMany'] = '25';

include "include/zstore.php";

?>

<?php

// configure Zazzle Store Builder display
$_GET[‘productLineId’] = ‘196273536250931593’;
$_GET['showPagination'] = 'false';
$_GET['showSorting'] = 'false';
$_GET['showProductDescription'] = 'false';
$_GET['showByLine'] = 'false';
$_GET['showProductTitle'] = 'false';
$_GET['showProductPrice'] = 'false';
$_GET['gridCellSize'] = 'small';
$_GET['defaultSort'] = 'date_created';
$_GET['showHowMany'] = '25';

include "include/zstore.php";

?>


The store is on this site Bigrat Design

Thanks
Ed
LisaMarieArt
Posted: Monday, November 09, 2009 3:37:55 AM

Groups: Member

Joined: 7/4/2008
Posts: 721
Location: Oop North
I'm not sure what the problem is but I've established that the problem doesn't lie with Zazzle itself or your zstore.php file.

If you click the link below it will take you to a page on your website which is displaying what you want... in this case it's your Abstract-Paper product line. The URL structure is what zstore puts in your address bar except we don't normally get to see it.

http://www.bigratdesignstudio.co.uk/zazzle/include/zstore.php?contributorHandle=edaldridge&productLineId=196938172531274049

The problem must lie somewhere between when you set the variables you want and when it passes to zstore.php to retrieve the data.

The next problem is that I can't see any errors in the code you've already provided. It's behaving as if the productLineId is not being recognised for some reason... One possible cause is if you mistype the $_GET[‘productLineId’] variable. The part I've bolded must be written exactly as I have. I managed to replicate your problem by deliberately misspelling productLineId in the link above. If you type productlineID (lowercase L) it pulls in anything it likes. However, both are spelt correctly in your examples.

Have you been editing any of the other zstore files? Have you tried overwriting your existing zstore files with fresh versions? Try overwriting the config file with a fresh copy, fill in the contributorHandle only, and see if it works. If it does, the problem was in that file. If not, work your way through each file by replacing & testing...

Sometimes starting again is the only option unfortunately. Sad

edaldridge
Posted: Monday, November 09, 2009 5:35:52 AM

Groups: Member

Joined: 8/26/2009
Posts: 9
Hi Lisa

Thanks so much for your help, I've managed to sort the problem out, it was such a stupid little thing in the end.

The formatting of the ' in the index.php file was wrong so it didn't recognise it as a correct line of code. It must have been because I was originally using Notepad to edit the code, I am now using Winsyntax noticed the problem after reading your last post!!

Thanks to everyone who contributed on this, especially Lisa, I really appreciate all the help!!
Ed
LisaMarieArt
Posted: Monday, November 09, 2009 5:52:56 AM

Groups: Member

Joined: 7/4/2008
Posts: 721
Location: Oop North
Wonderful news! So glad you got it sorted out. Can't wait to see your website when you get it finished. Grin
edaldridge
Posted: Monday, November 09, 2009 6:07:29 AM

Groups: Member

Joined: 8/26/2009
Posts: 9
Well I've got the grid thing sorted, now I need to work on integrating zazzle with my main sites CSS....Crying

Still can't quite believe it was something so stupid, really glad to have had your help getting it sorted!
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Print this topic
RSS Feed
Normal
Threaded