Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Cafe Press Details »»
Cafe Press
Version: 2.0.8, by Dylanblitz Dylanblitz is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.7.x Rating:
Released: 06-13-2008 Last Update: 07-21-2008 Installs: 97
Re-useable Code Additional Files  
No support by the author.

At this time this mod is not functioning correctly. Cafepress has redone their free site template and it will take a rewrite of this mod to get it to work again. Not extremely difficult, just time consuming. Unfortunately, 2 jobs, a sick kid and commercial work leaves free time few and far between nowadays. I will try and work on it when I can. If any other coder out there is interested they are free to take what I have and run with it, just like Creed posted on his original code.


This is a reworked version of the abandoned Cafe Press mod done by Creed.

This add-on will allow you to add all the items from any of your Cafe Press store's or multiples if you so choose. If you have multiple stores you are going to use, make sure you separate each store name with a comma.

This add-on works with Cafe Press basic store, as well as with premium stores.

Two files to upload.
One (optional) Template Edit.

Basic Store Demo

Basic Store Single Item Demo

If you have at least 2.0.3 installed then only change needed is to replace the shop.php file. You do not need to reimport the product.

PREMIUM OWNERS PLEASE READ!!
I will not be able to officially support the shops of premium owners. The main problem is that there is no standardization on the templates available to premium users, especially in the css and notes markup which is what I count on for the script, and it's unrealistic to try and code for each one. The shop works for premium shops with the default template and no css added. A lot of the templates mess up the formatting.

I will help with what I can but there is only so much I can do.
When asking for help please include the following:
path to your shop.php file
store id
template used (if possible)


Version History
v2.0.8 - [Tue 22th July 2008]
Removed Call-time pass-by-reference
Modified code to be xhtml valid (Thanks Enclave)

v2.0.7 - [Fri 11th July 2008]
Fixed category links

v2.0.6 - [Fri 27th June 2008]
Fixed link to create your own online shop

v2.0.5 - [Fri 27th June 2008]
Moved View Cart button to get it out of the Add to Cart form
Fixed hard code from store.php to shop.php
Added security for GET variable *Thanks Tim

v2.0.4 - [Fri 27th June 2008]
Removed cream background color on item view
Added navbar link to go back to main shop
Fixed mouseover color changes
Fixed Larger Image link

v2.0.3 - [Thur 26th June 2008]
Changed into a VB Product
Moved settings to AdminCP
Added AdSense capabilities
fixed bug with accessing some images on local drive instead of cafepress

v2.0.1 - [Sat 14th June 2008]
Changed qualification to pull in content to deal with multiple page types
(shop.php File Change only, nothing else needed)

v2.0.0 - [Fri 13th June 2008]
Initial Release

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 06-17-2008, 05:23 PM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed and uninstalled Didnt work so hot with moded Cafe Press CSS

www.cafepress.com/DieselBombers
Reply With Quote
  #33  
Old 06-18-2008, 01:41 AM
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
Location: OC, California
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DiesellMinded View Post
installed and uninstalled Didnt work so hot with moded Cafe Press CSS

www.cafepress.com/DieselBombers
Yeah, doesn't work so hot OOB. I copy and pasted the css from cafepress though and it worked fine.
Reply With Quote
  #34  
Old 06-18-2008, 05:57 AM
Phaedrus Phaedrus is offline
 
Join Date: Jul 2006
Location: Colorado
Posts: 617
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm.... When I click on an item to test out the single item view I get sent directly to cafepress...

Have I done something odd?
Reply With Quote
  #35  
Old 06-18-2008, 06:40 AM
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
Location: OC, California
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Phaedrus View Post
Hmmm.... When I click on an item to test out the single item view I get sent directly to cafepress...

Have I done something odd?
No, right now it sends you to cafe press. I'm reworking it so it'll keep it locally except for adding to the cart and checkout.
Reply With Quote
  #36  
Old 06-23-2008, 07:28 PM
dxflw dxflw is offline
 
Join Date: May 2008
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have uploaded the file in the right pace and edited the navbar template like you and
i get this message when i click to navbar shop

Code:
CafePress.com Product Not Found
We are sorry, but the product you requested could not be found. The page you are looking for may have been renamed, moved, or deleted. You may click on the "reload" button on your browser, or wait and try connecting again later. Please check the URL for spelling, capitalization, and punctuation errors, and click the "reload" button on your browser.

Are you having trouble finding something? Let us personally help you.

Call us. It's toll-free!

US Phone: 1-877-809-1659
Service Hours

Or contact Customer Service via email.
this is the shop.php:
Code:
-------------- SCRIPT BEGINS AFTER THIS LINE -----------------------------------------------*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'shop'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(
    
);

// pre-cache templates used by all actions
$globaltemplates = array(
    'CAFEPRESS',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'Cafe Press Shop';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

echo $stylevar[htmldoctype];

echo "<html dir=\"" . $stylevar[textdirection] . "\" lang=\"" . $stylevar[languagecode] . "\">\n";
echo "<head>\n";
echo "<title>" . $vboptions[bbtitle] . " Cafe Press Shop</title>\n";
echo $headinclude;
echo "</head>\n";
echo "<body>\n";
echo $header;

echo $navbar;

echo "<style type=\"text/css\">\n";
echo ".head {font-weight: bold; font-size: 1.5em}\n";
echo "</style>\n";

// SET VARIABLES //

$test = '<!-- SHOP CATEGORIES -->';
$test1 = '<!-- Start Main Content -->';

$stores = 'AbsolutGr_shop'; //EDIT THIS VARIABLE TO BE A LIST OF YOUR STORES
$url = 'http://www.cafepress.com/';
$item = $_GET['item'];

// WRITE CAFEPRESS JAVASCRIPT TO PAGE //
echo '<script language="JavaScript1.1" src="http://www.cafepress.com/commonscripts.js"></script>';

if ($item) { // Script has been called with a specific item, bring up detail page.
	$detail = $url . $item;

	$fp = fsockopen ("www.cafepress.com", 80, $errno, $errstr, 30);
	if (!$fp) {
	    echo "$errstr ($errno)<br>\n";
	} else {
	    fputs ($fp, "GET /$item HTTP/1.0\r\nHost: www.cafepress.com\r\nUser-Agent: MS Internet Explorer\r\n\r\n");
	    while (!feof($fp)) {
	        $content .= fgets($fp,1024);
	    }
	    fclose ($fp);
	}

$start = '<!-- Start Main Content -->';
$end = '<!-- End Content, Start Footer Include -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/\/cp/";
	$replacement = "http://www.cafepress.com/cp";
	$itemdetail = preg_replace($pattern, $replacement, $cparray[1]);

	$largeImgPattern = "/<a href=\"\//";
	$largeImgReplacement = "<a href=\"store.php?item=";
	$itemdetail = preg_replace($largeImgPattern, $largeImgReplacement, $itemdetail);

	// The next four lines aren't truly necessary. They 1)make the add to cart button pop up //
	// in its own window with the keep shopping button returning you to your custom store //
	// 2)add a view cart button (vey handy) and 3) change the link to the CP legal questions page //


	$itemdetail = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $itemdetail); 

	$itemdetail = preg_replace("/<form method=\"post\" name=\"prod_detail_form\" action=\"http:\/\/www.cafepress.com\/cp\/addtocart.aspx\">/i", "<form method=\"post\" name=cart action=\"http://www.cafepress.com/cp/addtocart.aspx?keepshopping=javascript:self.close()\" target=\"cartWin\">", $itemdetail); 
	$itemdetail = preg_replace("/<input type=\"submit\"/", "<input type=submit onClick=\"cartWin = window.open ('','cartWin','toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=500'); cartWin.focus(); return true;\"", $itemdetail);  
	$itemdetail = preg_replace("/alt=\"Add to Cart\">/", "alt\"Add to Cart\" >&nbsp;&nbsp;&nbsp;<input type=image src=\"images/misc/btn_viewcart.gif\" onClick=\"cartWin = window.open ('http://www.cafepress.com/cp/viewcart.aspx','cartWin','toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=500'); cartWin.focus(); return true;\">", $itemdetail);   
	$itemdetail = preg_replace("/<a href=\"http:\/\/www.cafepress.comhttp:\/\/www.cafepress.com/" , "<a href=\"http://www.cafepress.com", $itemdetail);


	echo "<script>";
	echo "function e (z, h, w, b, g) {";
	echo "document.write('<div style=\"width:'+w+';height:'+h+';background:white url(http://zoom.cafepress.com/'+(z%10)+'/'+z+'_zoom.jpg) no-repeat center center;\"><img border=\"'+b+'\" class=\"imageborder\" src=\"http://www.cafepress.com/cp/img/'+(g?'zoom':'spacer')+'.gif\" width=\"'+w+'\" height=\"'+h+'\"></div>')";
	echo "}";
	echo "</script>";

	echo $itemdetail;
}
else { // No item was requested when script was called, show items from all stores in the $stores variable.
	$allitems = $url . $stores;

	// connect to CP
	$reqheader = "GET /$stores HTTP/1.0\r\nHost: www.cafepress.com\r\nUser-Agent: MS Internet Explorer\r\n\r\n"; 
	$socket = @fsockopen("www.cafepress.com", 80, &$errno, &$errstr); 
	if ($socket) 
	{ 
		fputs($socket, $reqheader); 
		while (!feof($socket)) 
		{ 
			$content .= fgets($socket, 4096); 
		} 
	} 
	fclose($socket);

if (eregi($test, $content))
{

$start = '<!-- SHOP CATEGORIES -->';
$end = '<!-- End Content, Start Footer Include -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/<a href=\"\//";
	$replacement = "<a href=\"http://www.cafepress.com/";
	$storeitems = preg_replace($pattern, $replacement, $cparray[1]);
	$storeitems = preg_replace("/\/cp\//", "http://www.cafepress.com/cp/", $storeitems);
	$storeitems = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $storeitems); 

echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td VALIGN=\"TOP\">\n";

echo $storeitems;

echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";

} elseif (eregi($test1, $content)) {

$start = '<!-- Start Main Content -->';
$end = '<!-- End Content, Start Footer Include -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/<a href=\"\//";
	$replacement = "<a href=\"http://www.cafepress.com/";
	$storeitems = preg_replace($pattern, $replacement, $cparray[1]);
	$storeitems = preg_replace("/\/cp\//", "http://www.cafepress.com/cp/", $storeitems);
	$storeitems = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $storeitems); 

echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td VALIGN=\"TOP\">\n";

echo "	<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "	<tr>\n";
echo "	<td VALIGN=\"TOP\">\n";

echo "		<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "		<tr>\n";
echo "		<td VALIGN=\"TOP\">\n";

echo $storeitems;

} else {
$start = '<!-- basic shop coupon goes here \(max width 600px\)-->';
$end = '<!-- End Body Table -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/<a href=\"\//";
	$replacement = "<a href=\"http://www.cafepress.com/";
	$storeitems = preg_replace($pattern, $replacement, $cparray[1]);
	$storeitems = preg_replace("/\/cp\//", "http://www.cafepress.com/cp/", $storeitems);
	$storeitems = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $storeitems); 

echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td VALIGN=\"TOP\">\n";

echo "	<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "	<tr>\n";
echo "	<td VALIGN=\"TOP\">\n";

echo "		<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "		<tr>\n";
echo "		<td VALIGN=\"TOP\">\n";

echo $storeitems;

}





}




echo $footer;
echo "</body>\n";
echo "</html>";
?>
Reply With Quote
  #37  
Old 06-23-2008, 08:12 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great! I'm glad to have this finally working again. Wonderful job.

One question, if you have an item in your shop that is available in more colors they put an image beneath the product that says "More Colors Available." For some reason those images aren't being shown when viewing the shop.php, but once I'm at the Cafepress site they work fine (obviously). Any idea on a way to make this work?

http://www.elantraxd.com/forums/shop.php
Reply With Quote
  #38  
Old 06-23-2008, 10:26 PM
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
Location: OC, California
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The part in shop.php where you set the $stores variable is wrong. If you go to your shop it's pretty much

http://www.cafepress.com/your_store_name

That is what you need to put there. I went to yours

http://www.cafepress.com/AbsolutGr_shop

and got the same error.

Quote:
Originally Posted by dxflw View Post
i have uploaded the file in the right pace and edited the navbar template like you and
i get this message when i click to navbar shop

Code:
CafePress.com Product Not Found
We are sorry, but the product you requested could not be found. The page you are looking for may have been renamed, moved, or deleted. You may click on the "reload" button on your browser, or wait and try connecting again later. Please check the URL for spelling, capitalization, and punctuation errors, and click the "reload" button on your browser.

Are you having trouble finding something? Let us personally help you.

Call us. It's toll-free!

US Phone: 1-877-809-1659
Service Hours

Or contact Customer Service via email.
this is the shop.php:
Code:
-------------- SCRIPT BEGINS AFTER THIS LINE -----------------------------------------------*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'shop'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(
    
);

// pre-cache templates used by all actions
$globaltemplates = array(
    'CAFEPRESS',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'Cafe Press Shop';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

echo $stylevar[htmldoctype];

echo "<html dir=\"" . $stylevar[textdirection] . "\" lang=\"" . $stylevar[languagecode] . "\">\n";
echo "<head>\n";
echo "<title>" . $vboptions[bbtitle] . " Cafe Press Shop</title>\n";
echo $headinclude;
echo "</head>\n";
echo "<body>\n";
echo $header;

echo $navbar;

echo "<style type=\"text/css\">\n";
echo ".head {font-weight: bold; font-size: 1.5em}\n";
echo "</style>\n";

// SET VARIABLES //

$test = '<!-- SHOP CATEGORIES -->';
$test1 = '<!-- Start Main Content -->';

$stores = 'AbsolutGr_shop'; //EDIT THIS VARIABLE TO BE A LIST OF YOUR STORES
$url = 'http://www.cafepress.com/';
$item = $_GET['item'];

// WRITE CAFEPRESS JAVASCRIPT TO PAGE //
echo '<script language="JavaScript1.1" src="http://www.cafepress.com/commonscripts.js"></script>';

if ($item) { // Script has been called with a specific item, bring up detail page.
	$detail = $url . $item;

	$fp = fsockopen ("www.cafepress.com", 80, $errno, $errstr, 30);
	if (!$fp) {
	    echo "$errstr ($errno)<br>\n";
	} else {
	    fputs ($fp, "GET /$item HTTP/1.0\r\nHost: www.cafepress.com\r\nUser-Agent: MS Internet Explorer\r\n\r\n");
	    while (!feof($fp)) {
	        $content .= fgets($fp,1024);
	    }
	    fclose ($fp);
	}

$start = '<!-- Start Main Content -->';
$end = '<!-- End Content, Start Footer Include -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/\/cp/";
	$replacement = "http://www.cafepress.com/cp";
	$itemdetail = preg_replace($pattern, $replacement, $cparray[1]);

	$largeImgPattern = "/<a href=\"\//";
	$largeImgReplacement = "<a href=\"store.php?item=";
	$itemdetail = preg_replace($largeImgPattern, $largeImgReplacement, $itemdetail);

	// The next four lines aren't truly necessary. They 1)make the add to cart button pop up //
	// in its own window with the keep shopping button returning you to your custom store //
	// 2)add a view cart button (vey handy) and 3) change the link to the CP legal questions page //


	$itemdetail = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $itemdetail); 

	$itemdetail = preg_replace("/<form method=\"post\" name=\"prod_detail_form\" action=\"http:\/\/www.cafepress.com\/cp\/addtocart.aspx\">/i", "<form method=\"post\" name=cart action=\"http://www.cafepress.com/cp/addtocart.aspx?keepshopping=javascript:self.close()\" target=\"cartWin\">", $itemdetail); 
	$itemdetail = preg_replace("/<input type=\"submit\"/", "<input type=submit onClick=\"cartWin = window.open ('','cartWin','toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=500'); cartWin.focus(); return true;\"", $itemdetail);  
	$itemdetail = preg_replace("/alt=\"Add to Cart\">/", "alt\"Add to Cart\" >&nbsp;&nbsp;&nbsp;<input type=image src=\"images/misc/btn_viewcart.gif\" onClick=\"cartWin = window.open ('http://www.cafepress.com/cp/viewcart.aspx','cartWin','toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=500'); cartWin.focus(); return true;\">", $itemdetail);   
	$itemdetail = preg_replace("/<a href=\"http:\/\/www.cafepress.comhttp:\/\/www.cafepress.com/" , "<a href=\"http://www.cafepress.com", $itemdetail);


	echo "<script>";
	echo "function e (z, h, w, b, g) {";
	echo "document.write('<div style=\"width:'+w+';height:'+h+';background:white url(http://zoom.cafepress.com/'+(z%10)+'/'+z+'_zoom.jpg) no-repeat center center;\"><img border=\"'+b+'\" class=\"imageborder\" src=\"http://www.cafepress.com/cp/img/'+(g?'zoom':'spacer')+'.gif\" width=\"'+w+'\" height=\"'+h+'\"></div>')";
	echo "}";
	echo "</script>";

	echo $itemdetail;
}
else { // No item was requested when script was called, show items from all stores in the $stores variable.
	$allitems = $url . $stores;

	// connect to CP
	$reqheader = "GET /$stores HTTP/1.0\r\nHost: www.cafepress.com\r\nUser-Agent: MS Internet Explorer\r\n\r\n"; 
	$socket = @fsockopen("www.cafepress.com", 80, &$errno, &$errstr); 
	if ($socket) 
	{ 
		fputs($socket, $reqheader); 
		while (!feof($socket)) 
		{ 
			$content .= fgets($socket, 4096); 
		} 
	} 
	fclose($socket);

if (eregi($test, $content))
{

$start = '<!-- SHOP CATEGORIES -->';
$end = '<!-- End Content, Start Footer Include -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/<a href=\"\//";
	$replacement = "<a href=\"http://www.cafepress.com/";
	$storeitems = preg_replace($pattern, $replacement, $cparray[1]);
	$storeitems = preg_replace("/\/cp\//", "http://www.cafepress.com/cp/", $storeitems);
	$storeitems = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $storeitems); 

echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td VALIGN=\"TOP\">\n";

echo $storeitems;

echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";

} elseif (eregi($test1, $content)) {

$start = '<!-- Start Main Content -->';
$end = '<!-- End Content, Start Footer Include -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/<a href=\"\//";
	$replacement = "<a href=\"http://www.cafepress.com/";
	$storeitems = preg_replace($pattern, $replacement, $cparray[1]);
	$storeitems = preg_replace("/\/cp\//", "http://www.cafepress.com/cp/", $storeitems);
	$storeitems = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $storeitems); 

echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td VALIGN=\"TOP\">\n";

echo "	<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "	<tr>\n";
echo "	<td VALIGN=\"TOP\">\n";

echo "		<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "		<tr>\n";
echo "		<td VALIGN=\"TOP\">\n";

echo $storeitems;

} else {
$start = '<!-- basic shop coupon goes here \(max width 600px\)-->';
$end = '<!-- End Body Table -->';

	$null = eregi("$start(.*)$end", $content, $cparray);

	$pattern = "/<a href=\"\//";
	$replacement = "<a href=\"http://www.cafepress.com/";
	$storeitems = preg_replace($pattern, $replacement, $cparray[1]);
	$storeitems = preg_replace("/\/cp\//", "http://www.cafepress.com/cp/", $storeitems);
	$storeitems = preg_replace("/src=\"\/content/", "src=\"http://www.cafepress.com/content", $storeitems); 

echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td VALIGN=\"TOP\">\n";

echo "	<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "	<tr>\n";
echo "	<td VALIGN=\"TOP\">\n";

echo "		<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "		<tr>\n";
echo "		<td VALIGN=\"TOP\">\n";

echo $storeitems;

}





}




echo $footer;
echo "</body>\n";
echo "</html>";
?>
Reply With Quote
  #39  
Old 06-23-2008, 10:26 PM
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
Location: OC, California
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SuperGLS View Post
Great! I'm glad to have this finally working again. Wonderful job.

One question, if you have an item in your shop that is available in more colors they put an image beneath the product that says "More Colors Available." For some reason those images aren't being shown when viewing the shop.php, but once I'm at the Cafepress site they work fine (obviously). Any idea on a way to make this work?

http://www.elantraxd.com/forums/shop.php
Yeah, I haven't been able to get the script for the image switch on the color options to work. It's something I'm working on though.
Reply With Quote
  #40  
Old 06-24-2008, 11:19 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good stuff.
Reply With Quote
  #41  
Old 06-25-2008, 03:31 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I notice the more colors image is trying to load directly from my site, rather then CafePress: http://www.cafepress.com/content/mar...morecolors.gif Any way to fix that?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04701 seconds
  • Memory Usage 2,352KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete