ZSB Not displaying all products
The Vintage Vamp
Posted: Friday, October 21, 2011 8:14:22 PM
 Zazzle Proseller
Groups: , ProSeller

Joined: 1/14/2009
Posts: 1,945
I am having an unusual problem with my site: http://thevintagevamp.com

On some categories such as Travel Posters it is only displaying one page of results when there are over 800 products. (Displaying 1 - of products) While other categories are showing all results. (Displaying 1 - 30 of 267 products. 1 2 3 4 5 6 > >>) Anyone have any ideas as to what may cause this. Any help would be appreciated.

I have done the recent update to the lastRSS.php as suggested by Ed and have gone to his site and created a new Configuration.php file and it does the exact same thing on the same categories.

Doug
bettiepage
Posted: Friday, October 21, 2011 9:16:28 PM
 Zazzle Proseller
Groups: ProSeller

Joined: 9/12/2011
Posts: 109
Location: Atlanta-ish
What code are you using in your page to pull travel posters?
That could be the problem. Especially if everything else works fine.
Post it here.

Terry
The Vintage Vamp
Posted: Friday, October 21, 2011 10:34:42 PM
 Zazzle Proseller
Groups: , ProSeller

Joined: 1/14/2009
Posts: 1,945
Hello Terry,
It's just the older version of Zazzle Store Builder. ZSTORE 1.0.2
I have used a different configuration file and zstore file for each category. The only thing that changes between them are the category numbers. They have worked fine for a couple of years now. And it is not just the one category it is about half of them that only pull the first page of products.

The only code that is in a page is the short code that tells it to get the zstore file like this:

Code:
      <?php

// configure Zazzle Store Builder display
include "include/zstore34.php";

?>



Doug
FishTsdotcom
Posted: Saturday, October 22, 2011 5:04:01 AM
 Zazzle Proseller
Groups: ProSeller

Joined: 2/27/2008
Posts: 2,495
Of course make a full backup first.

But then just try deleting out that page then delete your cookies/cache and then reupload that page.

Have seen this on quite a few folks setup and this helps about half.

Some that use wordpress and get this have to reupload the files as if starting over. Lucky, when using wordpress the pages and posts are saved in the db.


It could merely just be an issue of the feed hanging or being messed up from an old cookie or cache, sometimes still trying to load old categories or not matching the new indexed system zazzle has.
The Vintage Vamp
Posted: Saturday, October 22, 2011 8:09:56 AM
 Zazzle Proseller
Groups: , ProSeller

Joined: 1/14/2009
Posts: 1,945
Thanks FishTsdotcom I will try that.
Terry at Zenescope
Posted: Saturday, October 22, 2011 12:38:09 PM
 Zazzle Proseller
Groups: ProSeller

Joined: 5/13/2011
Posts: 108
Location: Atlanta-ish
The Vintage Vamp wrote:


Code:
      <?php

// configure Zazzle Store Builder display
include "include/zstore34.php";

?>




Multiple Z-Stores sure isn't the way to do it. But let's see what you have in zstore34.p h p

Terry
The Vintage Vamp
Posted: Sunday, October 23, 2011 5:33:13 PM
 Zazzle Proseller
Groups: , ProSeller

Joined: 1/14/2009
Posts: 1,945
FishT That did not work.

Terry Here is zstore.p h p


Code:
<?php

/*
  Zazzle Store Builder 1.0.2 - a Zazzle.com product publishing tool
*/

// Please see the README.txt file included in this distribution for
// troubleshooting, installation and customization instructions

// import our external class libraries
require_once 'cacheMgr.php';
require_once 'lastRSS.php';
require_once 'configuration34.php';
require_once 'strings.php';

/*

Copyright (c) 2008, Zazzle.com

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
     * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
     * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
     in the documentation and/or other materials provided with the distribution.
     * Neither the name of Zazzle.com nor the names of its contributors may be used to endorse or promote products
     derived from this software without specific prior written permission.
     
THIS SOFTWARE IS PROVIDED BY Zazzle.com  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Zazzle.com BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

// if we have any of these params set in $_GET, they override our config file settings
if( isset( $_GET['contributorHandle'] )) $contributorHandle = $_GET['contributorHandle'];
if( isset( $_GET['associateId'] )) $associateId = $_GET['associateId'];
if( isset( $_GET['productLineId'] )) $productLineId = $_GET['productLineId'];
if( isset( $_GET['productType'] )) $productType = $_GET['productType'];
if( isset( $_GET['keywords'] )) $keywords = $_GET['keywords']." ".$keywords;
if( isset( $_GET['keywords'] )) $keywordParam = "&amp;keywords=".urlencode($_GET['keywords']);
if( isset( $_GET['gridWidth'] )) $gridWidth = $_GET['gridWidth'];
if( isset( $_GET['gridCellSize'] )) $gridCellSize = $_GET['gridCellSize'];
if( isset( $_GET['gridCellSpacing'] )) $gridCellSpacing = $_GET['gridCellSpacing'];
if( isset( $_GET['gridCellBgColor'] )) $gridCellBgColor = $_GET['gridCellBgColor'];
if( isset( $_GET['analyticsId'] )) $analyticsId = $_GET['analyticsId'];    
if( isset( $_GET['showHowMany'] )) $showHowMany = $_GET['showHowMany'];
if( isset( $_GET['startPage'] )) $startPage = $_GET['startPage'];
if( isset( $_GET['useCaching'] )) $useCaching = $_GET['useCaching'];
if( isset( $_GET['cacheLifetime'] )) $cacheLifetime = $_GET['cacheLifetime'];
if( isset( $_GET['defaultSort'] )) $defaultSort  = $_GET['defaultSort'];
if( isset( $_GET['currentSort'] )) $currentSort  = $_GET['currentSort'];

if( isset( $_GET['useAnalytics'] )) {
    $_GET['useAnalytics'] == 'true' ? $useAnalytics = true : $useAnalytics = false;
}

if( isset( $_GET['showPagination'] ))  {
     $_GET['showPagination'] == 'true' ? $showPagination = true : $showPagination = false;
}

if( isset( $_GET['showSorting'] ))  {
    $_GET['showSorting'] == 'true' ? $showSorting = true : $showSorting = false;
}

if( isset( $_GET['showProductDescription'] )) {
    $_GET['showProductDescription'] == 'false' ? $showProductDescription = false : $showProductDescription =  false;
}

if( isset( $_GET['showByLine'] )) {
    $_GET['showByLine'] == 'true' ? $showByLine = true : $showByLine =  false;
}

if( isset( $_GET['showProductTitle'] ))  {
    $_GET['showProductTitle'] == 'true' ? $showProductTitle = true : $showProductTitle = false;
}

if( isset( $_GET['showProductPrice'] )) {
    $_GET['showProductPrice'] == 'false' ? $showProductPrice = false : $showProductPrice = false;
}

// Standardize values to booleans if they are set as strings

if( isset($useCaching) && $useCaching != 1 && $useCaching != 'true' ) $useCaching = false;
if( isset($useCaching) && $useCaching == 'true' ) $useCaching = true;

// use analytics is a special case because we use the value as a string literal in javascript
if( isset($useAnalytics) && $useAnalytics != 1 && $useAnalytics != 'true' ) $useAnalytics = 'false';
if( isset($useAnalytics) && $useAnalytics == 'true' ) $useAnalytics = 'true';

if( isset($showPagination) && $showPagination != 1 && $showPagination != 'true' ) $showPagination = false;
if( isset($showPagination) && $showPagination == 'true' ) $showPagination = true;

if( isset($showSorting) && $showSorting != 1 && $showSorting != 'true' ) $showSorting = false;
if( isset($showSorting) && $showSorting == 'true' ) $showSorting = true;

if( isset($showProductDescription) && $showProductDescription != 1 && $showProductDescription != 'false' ) $showProductDescription = false;
if( isset($showProductDescription) && $showProductDescription == 'true' ) $showProductDescription = false;

if( isset($showByLine) && $showByLine != 1 && $showByLine != 'true' ) $showByLine = false;
if( isset($showByLine) && $showByLine == 'true' ) $showByLine = true;

if( isset($showProductTitle) && $showProductTitle != 1 && $showProductTitle != 'true' ) $showProductTitle = false;
if( isset($showProductTitle) && $showProductTitle == 'true' ) $showProductTitle = true;

if( isset($showProductPrice) && $showProductPrice != 1 && $showProductPrice != 'false' ) $showProductPrice = false;
if( isset($showProductPrice) && $showProductPrice == 'true' ) $showProductPrice = false;


if( $_GET['clean_cache'] == 'true' ) {
    // clean up
    $cache = new cacheMgr;
    $cache->clean_cache();
}

// $gridNumber lets zstore.php keep track of individual grids in a multi-grid setup
if( $gridNumber >= 1 ) {
    $gridNumber++;    
}
else {
    $gridNumber = 1;    
}

// URLS used by the Zazzle Store Builder
$poweredByZazzleButton = "http://www.zazzle.com/assets/graphics/logos/poweredByZazzle_v2.png";
$dataURLBase = $contributorHandle!="" ? 'http://feed.zazzle.com/'.$contributorHandle.'/feed' : 'http://feed.zazzle.com/feed';
$zazzleURLBase = 'http://www.zazzle.com';


// tiny, small, medium, large, huge.
switch( $gridCellSize ) {    
    case 'tiny':
        $gridCellSize = 50;
        break;    
    case 'small':
        $gridCellSize = 92;
        break;
    case 'medium':
        $gridCellSize = 152;
        break;
    case 'large':
        $gridCellSize = 210;                
        break;
    case 'huge':
        $gridCellSize = 328;
        break;
    default:
        $gridCellSize = $gridCellSize;
}

$gridCellWidth = $gridCellSize + 6;
$gridCellHeight = $gridCellSize + 4;
$associateIdParam = $associateId != "" && $associateId != "YOURASSOCIATEIDHERE" ? "?rf=".$associateId : "";

?>

<!-- Powered by Zazzle. For more information, please visit http://www.zazzle.com  // -->
<div class="allGrids clearfix">
    <div class="centerGrids" style="width:<?php echo $gridWidth?>px">
<?php

    // This section of code fetches the Rss data from cache or fresh from the server, parses it, converts the data into
    // a product data grid cell, caches the product and desigin images and outputs the grid cell html to the user's
    // browser for display.  You should not need to modify this section unless you wish to modify the grid cell html itself
    
    // create lastRSS object and set up its params
    $rss = new lastRSS;
    $cache = null;
    
    if( $useCaching == true ) {
        
        $rss->cache_dir = 'c';
        $rss->cache_time = $cacheLifetime;
        // create a cache manager object for image caching
        $cache = new cacheMgr;
        $cache->set_lifetime( $cacheLifetime );
    }
    
    $rss->CDATA = 'content';
    $rss->items_limit = 0;
    
    // init sort variable and some 'showing' variables we use later for pagination    
    $sortMethod = !isset( $_GET['st'] ) ? "st=date_created" : 'st=popularity';
    
    if($defaultSort == 'popularity') {
        $sortMethod = 'st=popularity';    
        $sortMode = 'popularity';        
    }
    if($defaultSort == 'date_created') {
        $sortMethod = 'st=date_created';    
        $sortMode = 'date_created';
    }
    if($currentSort == 'popularity') {
        $sortMethod = 'st=popularity';    
        $sortMode = 'popularity';        
    }
    if($currentSort == 'date_created') {
        $sortMethod = 'st=date_created';    
        $sortMode = 'date_created';
    }
    
    $cg = '';
    if( $productLineId ) {
        $cg = "&cg=$productLineId";    
    }
    
    $gridPages = array();
    $startPage = 1;
    
    if($_GET['gridPage'] != '' ) {
                
        if(!strstr( $_GET['gridPage'],  ',' )) {  // only one grid page passed
            $gridPages[] = $_GET['gridPage'];    
        }
        else { // list of multiple grid pages
            $gridPages = split( ',' , $_GET['gridPage'] );        
        }
            
        foreach( $gridPages as $gridPage ) {
            
            // Is this our gridNumber request?
            $gridNumberParts = split( '_', $gridPage );
                        
            if( $gridNumberParts[0] == $gridNumber ) {
                
                // yes - this is our gridPage request - override
                $startPage = $gridNumberParts[1];
            }     
        }    
    }    
        
    if( !$startPage ) $startPage = 1;    
    $showing = (( $showHowMany * $startPage ) - $showHowMany )+1;
    $showingEnd = $showHowMany * $startPage;
    
    // Get our grid sort values
    $gridSort = array();
    if( $_GET['gridSort'] != '' ) {
        
        if(!strstr($_GET['gridSort'], ',' )) {
            $gridSort = array( $_GET['gridSort'] );    
        }
        else {
            $gridSort = split(',', $_GET['gridSort'] );    
        }
    }
        
    foreach( $gridSort as $gridSortVal ) {
        $gridSortValueParts = split('_', $gridSortVal );
        if( $gridSortValueParts[0] == $gridNumber ) {
            switch( $gridSortValueParts[1] ) {
                case 'date':
                    $sortMethod = 'st=date_created';    
                    $sortMode = 'date_created';        
                    break;
                case 'popularity':
                 default:
                     $sortMethod = 'st=popularity';    
                    $sortMode = 'popularity';                    
            }
        }    
    }
    $keywords = str_replace(" ",",",str_replace(",","",$keywords));
    
    // Get our RSS data
    if ( $rs = $rss->get( $dataURLBase . '?'.$sortMethod.'&at='.$associateId.'&isz='.$gridCellSize.'&bg='.$gridCellBgColor.'&src=zstore&pg='.$startPage . $cg . '&ps='.$showHowMany.'&ft=gb&opensearch=true&qs='.$keywords.'&pt='.$productType ) ) {
        
    // Get the total number of results from the opensearch: namespace in RSS
    $totalNum = $rs['opensearch:totalResults'];    
    if ( $showingEnd > $totalNum ) {
        $showingEnd = $totalNum;  // can't show more results than we have
    }
    
    $pagination = '';
    $paginationText = '';
    $paginationText2 = '';
 
      // Figure out how many pages we have for pagination, use this to generate pagination control html
    if ( $rs['items_count'] > 0 ) {
    
        $totalPages = ceil( $totalNum/$showHowMany );
        if($totalPages > 1 ) {
            $pagination = $paginationText;
        }

        // Figure out where to start and stop the pagination page listing    
        $paginationStart = $startPage - 5;
        $paginationEnd = $startPage + 5;
        
        $paginationBack = $startPage - 1;
        $paginationFwd = $startPage + 1;
        
        if( $paginationStart < 1 ) $paginationStart = 1;
        if( $paginationBack < 1 ) $paginationBack = 1;
        
        if( $paginationEnd > $totalPages ) $paginationEnd = $totalPages;
        if( $paginationFwd > $totalPages ) $paginationFwd = $totalPages;
        
        // prepare the states of the other gridPages
        $gridPageHist = '';
        
        foreach( $gridPages as $pg ) {
            $gridNumberParts = split( '_', $pg );
            if( $gridNumberParts[0] != $gridNumber ) {
                $gridPageHist .= ',' . $pg;    
            }
        }
        
        $gridSortHist = '';
        foreach( $gridSort as $sort ) {
            if($sort == '') continue;
            $gridSortNumberParts = split( '_', $sort );
            //if( $gridSortNumberParts[0] != $gridNumber ) {
                if( $gridSortHist != '' ) $gridSortHist .= ',';
                $gridSortHist .= $sort;
            //}
        }
    
        // strip any leading commas
        $gridSortHist = preg_replace("/\,+$/", '', $gridSortHist );    

        if( $startPage > 1 ) {
            $pagination .= "<small><a class=\"paginationArrows\" title=\"$paginationBackToFirstPage\" href=\"?gridPage={$gridNumber}_1{$gridPageHist}&amp;gridSort={$gridSortHist}$keywordParam\">&lt;&lt;</a></small> "; // back to start
            
            $pagination .= "<small><a class=\"paginationArrows\" title=\"$paginationBackOnePage\" href=\"?gridPage={$gridNumber}_$paginationBack{$gridPageHist}&amp;&amp;gridSort={$gridSortHist}$keywordParam\">&lt;</a></small> "; // back one page
        }
    
        for ( $i=$paginationStart; $i<=$paginationEnd; $i++ ) {
            if( $totalPages <= 1) continue;    
            if( $i == $startPage ) $pagination .= '<span class="current" ><strong>' . $i . '</strong> </span>';
            else $pagination .= "<a title=\"$jumpToPage $i $ofResults\" href=\"?gridPage={$gridNumber}_{$i}{$gridPageHist}&amp;gridSort={$gridSortHist}$keywordParam\" class=\"default\">".$i."</a> ";
        }
    
        if( $startPage < $totalPages  ) {    
            $pagination .= "<small><a class=\"paginationArrows\" title=\"$advanceOnePageOfResults\" href=\"?gridPage={$gridNumber}_" . $paginationFwd . "{$gridPageHist}&amp;gridSort={$gridSortHist}$keywordParam\">&gt;</a></small> ";
            $pagination .= "<small><a class=\"paginationArrows\" title=\"$advanceToLastPageOfResults\" href=\"?gridPage={$gridNumber}_" .  $totalPages  . "{$gridPageHist}&amp;gridSort={$gridSortHist}$keywordParam\">&gt;&gt;</a></small> ";
        }
        
    echo "<div class=\"clearMe\"></div>";
    if ( $showPagination == 'true' || $showSorting == 'true' ) {echo "<div class='count' style='width:".$gridWidth."px'>";}
 
      $gridSortHist = '';
          
      // Add the sorting controls if we are showing sorting
    if ( $showSorting == 'true' ) {
                
        foreach( $gridSort as $sort ) {
            $gridSortNumberParts = split( '_', $sort );
            if( $gridSortNumberParts[0] == '' ) continue;
            if( $gridSortNumberParts[0] != $gridNumber ) {
                if($gridSortHist != '') $gridSortHist .= ',';
                $gridSortHist .= $sort;
            }
        }
        
        $gridSortHistDate = $gridSortHist . ",{$gridNumber}_date";
        $gridSortHistPopularity = $gridSortHist . ",{$gridNumber}_popularity";
        
        // strip any leading commas        
        $gridSortHistDate = preg_replace("/^[\,]*/", '', $gridSortHistDate );
        $gridSortHistPopularity = preg_replace("/^[\,]*/", '', $gridSortHistPopularity );
    
        if ( $sortMode == 'date_created' ) {
            echo "<span class=\"sortLinks\">$sortBy: <a href=\"?gridPage={$gridNumber}_$startPage{$gridPageHist}&amp;gridSort={$gridSortHistDate}$keywordParam\" class=\"selectedSort\" title=\"{$sortByDateTooltip}\"><strong>$dateCreated</strong></a> | <a href=\"?st=1&amp;gridPage={$gridNumber}_$startPage{$gridPageHist}&amp;gridSort={$gridSortHistPopularity}$keywordParam\" title=\"{$sortByPopularityTooltip}\">$popularity</a></span>";
        } else {
            echo "<span class=\"sortLinks\">Sort by: <a href=\"?gridPage={$gridNumber}_{$startPage}{$gridPageHist}&amp;gridSort={$gridSortHistDate}$keywordParam\" title=\"{$sortByDateTooltip}\">$dateCreated</a> | <a href=\"?st=1&amp;gridPage={$gridNumber}_{$startPage}{$gridPageHist}&amp;gridSort={$gridSortHistPopularity}$keywordParam\" class=\"selectedSort\" title=\"{$sortByPopularityTooltip}\"><strong>$popularity</strong></a></span>";
        }
    }
    
    // Complete the pagination text initialization
    $paginationText = "&nbsp;&nbsp;&nbsp;&nbsp;<span>$showingXofY  $showing - $showingEnd $of ".$totalNum." products.</span>&nbsp;&nbsp;".$pagination;
    $paginationText2 = "&nbsp;&nbsp;&nbsp;&nbsp;<span>$showingXofY $showing - $showingEnd $of ".$totalNum." products.</span>&nbsp;&nbsp;".$pagination;
    
    // Add the pagination control html if we are showing pagination
    if ( $showPagination == 'true' ) { echo $paginationText; }
    if ( $showPagination == 'true' || $showSorting == 'true' ) {echo "</div>";}
    echo "<div class=\"clearMe short\"></div>";
    
    // Iterate through the RSS items and extract their data, cache their images if required and output their grid cells
    foreach( $rs as $key=>$val ) {
          if ( $key=="items" ) {    // we only care about the <item> nodes in this case
              foreach( $val as $index => $value ) {
                // tidyup, initialize product data
                $title = urldecode( $value['title'] );
                $description = urldecode( $value['description'] );                
                $imageUrl = $value['g:image_link'];
                $productId = $value['g:id'];
                $price = $value['g:price'];
                $pubDate = $value['pubDate'];
                $artist = $value['artist'];
                $link = $value['link'];
                $link = str_replace( "&amp;CMPN=zstore&amp;zbar=1", "&amp;CMPN=zstore&amp;zbar=1&amp;tc=vvweb", $link);
                $shortdescription = '';
                // strip any html from the description
                $description = preg_replace( "/<[^>]+>/", '', $description );
                $title = preg_replace( "/<[^>]+>/", '', $title );
                $shortdescription = preg_replace( "/<[^>]+>/", '', $shortdescription );
                if( $showProductDescription == true ) {
                    $description = preg_replace( "/\.\.\./", '... ', $description );
                    $description = preg_replace( "/\,/", ', ', $description );
                    $descriptionWords = preg_split("/[\s]+/", $description );
                
                    for( $i = 0; $i <= 10; ++$i ) {
                            $shortdescription .= $descriptionWords[$i] . ' ';
                    }
                    
                    if( sizeof( $descriptionWords ) > 10 ) $shortdescription .= '...';
                }

                // generate the analytics link if we are using google analytics
                  if ( $useAnalytics=="true" ) {
                    $analyticsLink = "onclick=\"pageTracker._link(this.href); return false;\"";
                }
                else {
                    $analyticsLink = "";
                }

                $galleryUrl = "http://www.zazzle.com/".$artist.$associateIdParam;    
                                                                            
                if( $useCaching == true ) {
                    $imageUrl = preg_replace( '/amp;/','', $imageUrl );  // un-escape the ampersands
                    $imageSrc = ''; // we'll use this to set the image's initial src url
                    
                    // build our product image url
                    $productImageUrl = $imageUrl;
                                                                                
                    // extract the product type from the original image url
                    $found = array();
                    preg_match( "/pdt=([^\&]+)/", $productImageUrl, $found );
                    
                    $imageFileBaseName = preg_replace( "/[^a-z^A-Z^0-9^ ]/", '', $title );
                    $imageFileBaseName = preg_replace( "/\s+/", '_', $imageFileBaseName );
                    
                    $imageFileBaseName = strtolower( urlencode( $imageFileBaseName  ));
                    $imageFileBaseName .=  '-' . $found[1] . '-'. $productId;
            
                    $productFile = $imageFileBaseName . '-product-' .$gridCellSize . '.jpg';
                    
                    // do we have this product's images already in the cache?
                    if( $cache->is_image_cached( 'c/'. $productFile ) ) {   // yes - override image url with local url
                        $productImageUrl = 'c/'. $productFile;
                    }            
                    else {  // no - go get the image from the server and cache
                        
                        // get product image - this will fail if your version of php is not curl-enabled
                        $ch = curl_init( rawurldecode( $productImageUrl ) );
                        $fh = fopen( "c/" . $productFile, "w" );                    
                        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
                        curl_setopt ($ch, CURLOPT_HEADER, 0);
                        $fdata = curl_exec( $ch );
                        fwrite( $fh, $fdata );
                        curl_close( $ch );
                        fclose( $fh );
                                                                
                        // override the remote url with the cached versions so we point at the local copies
                        $productImageUrl =  "c/$productFile";
                        $imageSrc = $productImageUrl;    
                }
              }
            else { // no - we are not using caching
                
                $imageSrc = $imageUrl;
            }            
                
            $displaytitle = '';    
            $desc = '';
            $displayprice = '';
            $byline = '';
            
            

            if( $showProductTitle == 'true' ) {
                $displaytitle = "<a href=\"$link\" $analyticsLink class=\"productTitle\" title=\"$title\" style=\"width: ".$gridCellWidth."px;\">$title</a>";
            }
            
            if( $showProductDescription  == 'true' ) {
                $desc =  "<div class=\"productDescription\" title=\"$description\"><a href=\"$link\" $analyticsLink title=\"$description\" class=\"productDescription\" >$shortdescription</a></div>";    
            }
            
            if ( $showByLine == 'true' ) {
                $byline = "$by <a href=\"$galleryUrl\" title=\"$viewMoreProductsFrom $artist\">$artist</a>";
            }
            
            if( $showProductPrice == 'true' ) {
                    $displayprice = "<div class=\"productPrice\"><a href=\"$link\" title=\"$description\" class=\"productPrice\">$$price</a></div>";
            }
                                
            // output the product's grid cell                
            echo <<<EOD
                <div class="gridCell" style="width: {$gridCellWidth}px;margin:0 {$gridCellSpacing}px {$gridCellSpacing}px 0;">
                    <a href="$link" $analyticsLink class="realviewLink" style="height: {$gridCellHeight}px;"><img src="$imageSrc" class="realviewImage" alt="$title" title="" style="border:2px solid #$gridCellBgColor;" /></a>
                    <div class="gridCellInfo">
                        $displaytitle
                        $desc                        
                        $byline
                        $displayprice
                    </div>
                </div>
EOD;
        
            }
          }
      }
      
    echo "<div class=\"clearMe\"></div><br />";
    if ( $showPagination == 'true' || $showSorting == 'true' ) {
        echo "<div class='count' style='width:".$gridWidth."px'>\n\n";
    } else {
        echo "<div class='count' style='width:100%;'>";
    }
    
    // if we have sort controls enabled, show them
    if ( $showSorting == 'true' ) {
        if ( $sortMode == 'date_created' ) {
            echo "<span class=\"sortLinks\">$sortBy: <a href=\"?gridPage={$gridNumber}_{$startPage}{$gridPageHist}&amp;gridSort={$gridSortHistDate}$keywordParam\" class=\"selectedSort\"><strong>$dateCreated</strong></a> | <a href=\"?st=1&amp;gridPage={$gridNumber}_{$startPage}{$gridPageHist}&amp;gridSort={$gridSortHistPopularity}$keywordParam\">$popularity</a></span>";
        }
        else {
            echo "<span class=\"sortLinks\">Sort by: <a href=\"?gridPage={$gridNumber}_{$startPage}{$gridPageHist}&amp;gridSort={$gridSortHistDate}$keywordParam\">$dateCreated</a> | <a href=\"?st=1&amp;gridPage={$gridNumber}_{$startPage}{$gridPageHist}&amp;gridSort={$gridSortHistPopularity}$keywordParam\" class=\"selectedSort\"><strong>$popularity</strong></a></span>";
        }
    }
    
    // if we have pagination enbled, show pager control
    if ( $showPagination == 'true' ) { echo $paginationText2; }

    echo "<div class='pbimg'><a href='$zazzleURLBase$associateIdParam'><img src='$poweredByZazzleButton' alt='$poweredByZazzle' /></a></div></div><div class=\"clearMe\"></div>";
    
    
?>
<br />
<?php
}
else {  // no - rss socket is not responding
    echo "<br /><div class=\"error\">$errorStringProductsUnavailable</div>";
}
  }
  else {  // fatal error - no cached RSS, no socket
      die ( $errorStringRSSNotFound );
  }
 
?>

    </div>
</div>

<script type="text/javascript">//<![CDATA[
// Google analytics tracking
var useAnalytics = <?php echo $useAnalytics?>;
if ( useAnalytics ) {
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
}
//]]></script>
<script type="text/javascript">//<![CDATA[
// Google analytics page tracking
var useAnalytics = <?php echo $useAnalytics?>;
if ( useAnalytics ) {
    var pageTracker = _gat._getTracker("<?php echo $analyticsId?>");
    pageTracker._setDomainName("none");
    pageTracker._setAllowLinker(true);
    pageTracker._trackPageview();
}
//]]></script>
FishTsdotcom
Posted: Monday, October 24, 2011 3:31:02 AM
 Zazzle Proseller
Groups: ProSeller

Joined: 2/27/2008
Posts: 2,495
This must be pulled from the "view source"?

However, your still serving your cached pages thru the zsb, I bet if you look you have a ton of stuff in the "c" folder. Delete all that out of the folder and do a page refresh.

If yall dont get it, shoot me an email b i l l h @ g c w e b s.com





FishTsdotcom
Posted: Tuesday, October 25, 2011 6:05:40 AM
 Zazzle Proseller
Groups: ProSeller

Joined: 2/27/2008
Posts: 2,495
For those that may be having the same issues here is a fix. Well maybe not a fix since we have no explanation why it happens but a way to get around it.

Again, always backup your files before doing this, just in case you need to revert back to the original settings.

Redownload a new copy of the zsb files. Now upload the new zsb files over your existing zsb files on your server. Any modified files will be returned to original(reason for backup), but this should get all your products back to at least showing up and with the pagenation included.

This has also helped on a few zstore helper plugin that had the same issue.

Im not 100% sure, but some feedback from zazzle would help, but it seems that when zazzle reconfigured the categories and reindexed their entire site that the feed's may not have updated properly thru your files located on your servers. So basically by reuploading new copies of the zsb its telling your site to load the feeds for the first time and thus resulting in everything working again.
Any idea's on this theory from zazzle would be great.

Bill
bettiepage
Posted: Tuesday, October 25, 2011 12:58:09 PM
 Zazzle Proseller
Groups: ProSeller

Joined: 9/12/2011
Posts: 109
Location: Atlanta-ish
The Vintage Vamp wrote:
FishT That did not work.

Terry Here is zstore.p h p


Code:

require_once 'configuration34.p h p';


Now configuration34.php Smile

Terry
DeZineZone - Gary White
Posted: Saturday, June 16, 2012 4:55:03 PM

Groups: Member

Joined: 2/20/2010
Posts: 15
Location: Lakewood
Hello Bill (Fishts)
Below is some info on my issue. Any help would be greatly appreciated.

I am using:
Wordpress 3.4
ZSB 1.0.2 (latest I can find on zazzle's site)
Premium Zstore plugin 2.5
Suffusion template 4.1.5.b4

My issue is that the pagination does not work correctly. Some pages will show this:
Sort by: date created | popularity Showing 1 - 20 of 48 products. 1 2 3 > >>

and others will show this:

Sort by: date created | popularity Showing 1 - of products. <-------- MY PROBLEM

It seems to be less of a problem and act up on fewer pages when it is set to sort by date created and much worse when it is sorted by popularity.by default
I have tried swapping out short code in ones that work properly with ones that don't but that has no effect.
I have tried going back to the standard zstore helper plugin also but still has no effect in rectifying the issue.
I tried reinstalling ZSB but no luck with that either.
I tried deleting the page and re-creating it and still no luck.
I tried using the default template and several others to see if it was a template issue but that didn't solve it either.
Everything used to work fine on this site.

Here is an example of the shortcode I am using:
Code:
Code:
[zstore contributorhandle="niteowlstudio" associateid="238668694610307232" productlineid="196932791435438590" showhowmany="20" rf=238668694610307232]



I tried taking different parts of this code out to see if that would get it working properly but also with no luck

Here is a link to the site I am having issues on:
http://www.niteowlstudio.ca/


Here is a page I have included 2 short codes on; one that works and one that doesn't. The code is identical except for the productid. below are the 2 pieces of code used on this page.

http://www.niteowlstudio.ca/weddings/wedding-collections/aqua-black-floral-ii-wedding-collection/

The code:
Code:
[zstore contributorhandle="niteowlstudio" associateid="238668694610307232" productlineid="196628860491824910" showhowmany="20" rf=238668694610307232]

[zstore contributorhandle="niteowlstudio" associateid="238668694610307232" productlineid="196932791435438590" showhowmany="20" rf=238668694610307232]


Thank you for any insight you can give me

Gary White
Beachwalker
Posted: Monday, June 18, 2012 6:30:20 PM
 Zazzle Proseller
Groups: ProSeller

Joined: 4/15/2008
Posts: 3,605
Gary, for what it's worth, I copied your short codes into my site and the same thing happened. It's the productline ID that is triggering the problem.

Curious - why do you repeat the rf ID at the end of the short code and within the short code? Don't you have it set in the main plugin page as well?

www.rightbrainleftturn is where I tried it - different theme, etc!
Terry at Zenescope
Posted: Monday, June 18, 2012 7:57:08 PM
 Zazzle Proseller
Groups: ProSeller

Joined: 5/13/2011
Posts: 108
Location: Atlanta-ish


Gary - you have no pagination on that page because there is only 15 products in that category (and you have it set to show 20 products).
http://www.zazzle.com/niteowlstudio/gifts?cg=196932791435438590

Doh!
Beachwalker
Posted: Tuesday, June 19, 2012 6:32:19 AM
 Zazzle Proseller
Groups: ProSeller

Joined: 4/15/2008
Posts: 3,605
Nope, Terry, that's not it. I tried changing it to show ten and same results. I just stuck both short codes on this page: http://rightbrainleftturn.com/trial-page/

For some reason, it's not counting the products. It doesn't seem like too big a deal to worry about except that one wonders what else might not be working right that isn't visible.
Terry at Zenescope
Posted: Tuesday, June 19, 2012 12:12:30 PM
 Zazzle Proseller
Groups: ProSeller

Joined: 5/13/2011
Posts: 108
Location: Atlanta-ish
Hide "description" and see if it works then. You have a lot of HTML in your descriptions that may be throwing it off.

T
Beachwalker
Posted: Tuesday, June 19, 2012 3:42:50 PM
 Zazzle Proseller
Groups: ProSeller

Joined: 4/15/2008
Posts: 3,605
Terry, that didn't do it either. It's actually not my store; I was just curious to see if I could figure out what was going on!

Another oddball ZStore thing - have you run into an instance where you get oddball letters inserted into your page? I've got this "es" showing up under the titles for all the store pages on this site. I haven't been able to figure it out and guess I'll have to go put a fresh version of the plugin and hope that works. Substituting all the files didn't do anything.

Thanks,
Deb


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