Originally Posted by dxflw
(Post 1557122)
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\" > <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>";
?>
|