|
Author: |
COPYRIGHT NOTICE The contents of this file is protected under the United States
copyright laws as an unpublished work, and is confidential and
proprietary to GreyBeard Design Group. Its use or disclosure in
whole or in part without the expressed written permission of
GreyBeard Design Group is expressely prohibited. |
SUPPORT If you have difficulty installing this add-on, please contact us with all relavent details at info@greybearddesign.com
|
Catalog on Demand for ProductCart will allow ProductCart merchants and site visitors to publish on-demand custom catalogs and flyers, any time they wish, and with the products that they desire.
This series of scripts provides the following options:
This add-on supports versions and builds of ProductCart from v3.12 forward. BTO stores are supported in the same manner as a Standard store, or Apparel if that mod is installed.
Earlier versions should be upgraded due to the security implications, and cannot otherwise be supported by GreyBeard Design Group.
Before you start installing this code, go to
this page and sign up for a Catalog On Demand account.
It is not unusual that the names of both the "productcart" and "pcadmin" folders
are changed during installation. As you follow the instructions below,
please replace those references with the appropriate folder names in your web
site.
| /productcart/includes/gbdg_COD_Config.asp /productcart/includes/gbdg_COD_Functions.asp /productcart/includes/gbdg_COD_Functions.js /productcart/includes/gbdg_CoD_inc01.asp /productcart/includes/gbdg_CoD_inc02.asp /productcart/includes/gbdg_CoD_inc03.asp /productcart/includes/gbdg_CoD_inc04.asp /productcart/includes/gbdg_CoD_inc05.asp /productcart/includes/gbdg_CoD_inc06.asp
Note: If you wish to cause the "Create PDF Catalog"
button to appear in the page title row of your store pages, read the notes in the file gbdg_COD_button.css. |
/productcart/pc/gbdg_COD.css /productcart/pc/gbdg_COD_button.css /productcart/pc/gbdg_COD_PrdSrch.asp /productcart/pc/gbdg_COD_PrdSrchProcess.asp /productcart/pc/gbdg_COD_WishList.asp /productcart/pc/gbdg_COD_WishListProcess.asp /productcart/pc/gen_validatorv31.js /productcart/pcadmin/gbdg_COD_DBxfer.asp /productcart/pc/images/bt_createPDFCatalog_default.png |
/productcart/includes/gbdg_COD_Functions-APP.asp
/productcart/includes/gbdg_CoD_inc01.asp
/productcart/pc/gbdg_COD_WishListProcess.asp
/productcart/pcadmin/gbdg_COD_DBxferProcess.asp
Additionally, this add-on requires customization to the following ProductCart files:
Please make a backup of your files before you customize them.
| /productcart/includes/languages.asp /productcart/includes/languagesCP.asp | /productcart/pc/Custquotesview.asp /productcart/pc/showbestsellers.asp /productcart/pc/showfeatured.asp /productcart/pc/shownewarrivals.asp /productcart/pc/showsearchresults.asp /productcart/pc/showspecials.asp /productcart/pc/viewcategories.asp | V3 only: /productcart/pcadmin/setdropdownmenu.asp V4 only: /productcart/pcadmin/pcv4_navigation_links.asp |
V3.51 and V4 USERS: We are also providing with this add-on the stock files from Early Impact that have been altered for this mod. If you know that your versions of these files are TOTALLY unaltered from Early Impact distribution code, you can drop these altered files into your site, bypass Step 3 below, and proceed to Step 4. If your store has already been customized, please use the instructions in Step 3 in order to merge our changes with your own.The following folders are provided, and the folder names are representative of the versions. Match that to your store and copy the appropriate set of files to the site.
- v3.51 with SEO mod - parent paths enabled or disabled
- v3.51 (standard)\SEO mod installed\parent paths enabled
- v3.51a (apparel mod)\SEO mod installed\parent paths enabled
- v3.51 (standard)\SEO mod installed\parent paths disabled
- v3.51a (apparel mod)\SEO mod installed\parent paths disabled
- v3.51 without SEO mod - parent paths enabled or disabled
- v3.51 (standard)\SEO mod NOT installed\parent paths enabled
- v3.51a (apparel mod)\SEO mod NOT installed\parent paths enabled
- v4.03 (or later) - parent paths enabled or disabled
- v4.03 (standard)\parent paths enabled
- v4.03a (apparel mod)\parent paths enabled
- v4.03 (standard)\parent paths disabled
- v4.03a (apparel mod)\parent paths disabled
Due to uncertain demand, we will not create these PPD versions until such time that they are requested.
- v3.51 (standard)\SEO mod NOT installed\parent paths disabled
- v3.51a (apparel mod)\SEO mod NOT installed\parent paths disabled
The installation process consists of 6 main tasks.Ready? OK, let's get started.
- Upload the new files supplied with this add-on. These appear in the "CoD Integration Code" folder.
- For stock, non-customized stores: Upload the altered versions of ProductCart files supplied with this add-on. These appear in the "Altered ProductCart Files" folder.
- For customized stores: Following the instructions provided below, edit and upload any of the 10 ProductCart files (which are altered for this mod, but which you have previously altered for prior mods) in order to integrate the new functionality.
- Edit your header.asp file. (Note - please read the commentes in gbdg_COD_button.css for guidance on optional CoD button placement.)
- Use the configuration tool provided with this add-on to establish your setting preferences.
- Configure your Site Visitor Publication Settings in your account at www.catalog-on-demand.com.
It will likely help you understand the process if you read (or at least browse) this entire document before you do anything further.
|
/productcart/includes/languages.asp /productcart/includes/languagesCP.asp |
/productcart/pc/custquotesview.asp /productcart/pc/showbestsellers.asp /productcart/pc/showfeatured.asp /productcart/pc/shownewarrivals.asp /productcart/pc/showsearchresults.asp /productcart/pc/showspecials.asp /productcart/pc/viewcategories.asp |
V3 only: /productcart/pcadmin/setdropdownmenu.asp V4 only: /productcart/pcadmin/pcv4_navigation_links.asp |
Notes:
There are many individual edits listed below. Please understand that we intentionally created a number of very small files which are referenced as "includes" so that most of the edits we ask you to perform are limited to adding one line of code in each necessary location. If we were doing this work as a single-site custom programming request, we would not build such small files. But recognizing that many merchants and developers who install this code may have a range of skills in terms of editing code, we wanted to make this install procedure as simple as possible, even at the risk of using includes in a somewhat unorthodox manner.
We have provided a checkbox below each step which you may mark when you complete each step so that if you are interrupted during your work you will have a reminder as to where you left off.Each section of code to be copy/pasted into a ProductCart script (the gray textarea boxes below marked with a dotted border) has a Javascript associated with it. When you move your mouse pointer to the code box, the Javascript will automatically copy that section of code to your clipboard, ready to be pasted to the specified location within the ProductCart page. You should be able to move your mouse pointer to each box, the text is then automatically copied to memory, then you move your mouse pointer to the script being edited and hit "Ctrl-V" which will paste the code into your script.
Again, if you feel there is an easier way to make this install process happen, or that clarification is required, please let us know. We recognize that the following represents a great deal of effort. Good luck - let us know if we can help.
/productcart/includes/languages.asp
Edit A1: At the very bottom of this file, locate the following statement:
' end language definitionsImmediately above that statement, paste the following:
After performing the specified edit, please save your changes and close languages.asp. Upload languages.asp to the INCLUDES folder.In the block above, please note the reference to YOURDOMAIN.COM. Please edit that line to reflect the name of your web store, along with any other preferred text changes.
The messages above are those that will instruct your site visitor as to how to use Catalog on Demand. You may wish to review and edit these as you see fit.
/productcart/includes/languagesCP.asp
Edit B1: At the very bottom of this file, locate the following statement:
%>Immediately above that statement, paste the following:
/productcart/pc/Custquotesview.asp
Edit C1: Near the top of the file, locate the following statement:
<!--#include file="../includes/adovbs.inc"-->Immediately below that line, paste the following:
The result should look like:Please mark this checkbox as a reminder that code edit step #C1 has been completed.
<!--#include file="../includes/adovbs.inc"-->
<!--#include file="../includes/gbdg_CoD_inc01.asp"--> <%' gbdg mod for Catalog on Demand (Edit #c1) %>
<!--#include file="../includes/emailsettings.asp"--> <%' gbdg mod for Catalog on Demand (Edit #c1) %>
'*****************************************************************************************************Immediately above the first line above, paste the following:
' START: Check store on/off, start PC session, check affiliate ID
'*****************************************************************************************************
The result should look like:Please mark this checkbox as a reminder that code edit step #C2 has been completed.
%><!--#include file="../includes/gbdg_CoD_inc02.asp"--><%' gbdg mod for Catalog on Demand (Edit #c2) %><%
'*****************************************************************************************************
' START: Check store on/off, start PC session, check affiliate ID
'*****************************************************************************************************
query="SELECT DISTINCT wishList.qsubmit,wishList.qdate,wishList.idquote,wishList.discountcode,configWishlistSessions.idconfigWishlistSession, configWishlistSessions.idproduct, configWishlistSessions.fPrice,configWishlistSessions.dPrice, products.description, products.serviceSpec, products.price, products.bToBPrice, products.SKU, products.stock, products.active, products.noprices,products.weight,products.noStock,products.smallImageUrl FROM (wishList INNER JOIN configWishlistSessions ON wishList.idconfigWishlistSession=configWishlistSessions.idconfigWishlistSession) INNER JOIN products ON configWishlistSessions.idproduct=products.idProduct WHERE (((wishList.idCustomer)="&pIdCustomer&") AND ((wishList.idconfigwishlistsession)<>0)) ORDER BY wishList.idquote DESC;"Replace that line with the following:
The result should look like the following. Note that the following sections of code (one marked in black, and the other in maroon) are each single lines. They wrap here in these instructions but in your script they must remain all on one line. The first line is a comment, followed by a lengthy SQL query.Please mark this checkbox as a reminder that code edit step #C3 has been completed.
' gbdg mod for Catalog on Demand - Added "products.formquantity,products.imageURL,products.emailtext,cast(products.sDesc as varchar(8000)) sDesc,cast(products.Details as varchar(8000)) Details" to select (Edit #c3)
query="SELECT DISTINCT wishList.qsubmit,wishList.qdate,wishList.idquote,wishList.discountcode,configWishlistSessions.idconfigWishlistSession, configWishlistSessions.idproduct, configWishlistSessions.fPrice,configWishlistSessions.dPrice, products.description, products.serviceSpec, products.price, products.bToBPrice, products.SKU, products.stock, products.active, products.noprices,products.weight,products.noStock,products.smallImageUrl,products.formQuantity,products.imageURL,products.emailtext,cast(products.sDesc as varchar(8000)) sDesc,cast(products.Details as varchar(8000)) Details FROM (wishList INNER JOIN configWishlistSessions ON wishList.idconfigWishlistSession=configWishlistSessions.idconfigWishlistSession) INNER JOIN products ON configWishlistSessions.idproduct=products.idProduct WHERE (((wishList.idCustomer)="&pIdCustomer&") AND ((wishList.idconfigwishlistsession)<>0)) ORDER BY wishList.idquote DESC;"
rstemp.Open query, Conntemp, adOpenStatic, adLockReadOnly, adCmdTextImmediately below that line, paste the following:
The result should look like this:Please mark this checkbox as a reminder that code edit step #C4 has been completed.
rstemp.Open query, Conntemp, adOpenStatic, adLockReadOnly, adCmdText
%><!--#include file="../includes/gbdg_CoD_inc06.asp"--><%' gbdg mod for Catalog on Demand (Edit #c4)
if not rstemp.eof thenImmediately below those lines, paste the following:
iPageCount=rstemp.PageCount
The result should look like this:Please mark this checkbox as a reminder that code edit step #C5 has been completed.
if not rstemp.eof then
iPageCount=rstemp.PageCount
gbdgCodiRecCount = rstemp.RecordCount ' gbdg mod for Catalog on Demand Get number of records returned for COD (Edit #c5)
<%Please replace those lines with the following:
wishListTotal=Cint(0)
do while not rstemp.eof
The result should be identical to the above blockPlease mark this checkbox as a reminder that code edit step #C6 has been completed.
query="SELECT products.idProduct, products.description, products.serviceSpec, products.price, products.sku, products.bToBPrice, products.stock, products.noStock, products.active, products.smallImageUrl, wishlist.pcwishlist_OptionsArray, wishlist.IDQuote,products.pcProd_BackOrder FROM wishlist, products WHERE (((products.idProduct)=[wishlist].[idproduct]) AND ((wishlist.idCustomer)="&pIdCustomer&") AND ((products.serviceSpec)=0));"Please replace those lines with the following:
set rstemp=server.CreateObject("ADODB.RecordSet")
set rstemp=connTemp.execute(query)
The result should look like the following. Note that the following sections of code (one marked in black, and the other in maroon) are each single lines. They wrap here in these instructions but in your script they must remain all on one line. The first line is a comment, followed by a lengthy SQL query.Please mark this checkbox as a reminder that code edit step #C7 STD has been completed.
' gbdg mod for Catalog on Demand - Added "products.formquantity,products.imageURL, products.emailtext,cast(products.sDesc as varchar(8000)) sDesc,cast(products.Details as varchar(8000)) Details" to select (Edit #c7 STD)
query="SELECT products.idProduct, products.description, products.serviceSpec, products.price, products.sku, products.bToBPrice, products.stock, products.noStock, products.active, products.smallImageUrl, wishlist.pcwishlist_OptionsArray, wishlist.IDQuote,products.pcProd_BackOrder, products.formQuantity, products.imageURL, products.emailtext,cast(products.sDesc as varchar(8000)) sDesc,cast(products.Details as varchar(8000)) Details FROM wishlist, products WHERE (((products.idProduct)=[wishlist].[idproduct]) AND ((wishlist.idCustomer)="&pIdCustomer&") AND ((products.serviceSpec)=0));"
set rstemp=server.CreateObject("ADODB.RecordSet")
set rstemp=connTemp.execute(query)
<!--#include file="../includes/gbdg_CoD_inc06.asp"--><%' gbdg mod for Catalog on Demand (Edit #c7)
'APP-SPlease replace those lines with the following:
query="SELECT products.idProduct, products.description, products.serviceSpec, products.price, products.sku, products.bToBPrice, products.stock, products.noStock, products.active, products.smallImageUrl, products.imageUrl,products.pcProd_ParentPrd,products.pcProd_SPInActive, wishlist.pcwishlist_OptionsArray, wishlist.IDQuote,products.pcProd_BackOrder FROM wishlist, products WHERE (((products.idProduct)=[wishlist].[idproduct]) AND ((wishlist.idCustomer)="&pIdCustomer&") AND ((products.serviceSpec)=0));"
'APP-E
set rstemp=server.CreateObject("ADODB.RecordSet")
set rstemp=connTemp.execute(query)
The result should look like the following. Note that the section of code marked in maroon is actually one single line. It wraps here in these instructions but in your script they must remain all on one line:Please mark this checkbox as a reminder that code edit step #C7 APP has been completed.
' gbdg mod for Catalog on Demand - Added "products.formquantity, products.emailtext, products.sDesc, products.details" to select (Edit #c7 APP)
'APP-S
query="SELECT products.idProduct, products.description, products.serviceSpec, products.price, products.sku, products.bToBPrice, products.stock, products.noStock, products.active, products.smallImageUrl, products.imageUrl,products.pcProd_ParentPrd,products.pcProd_SPInActive, wishlist.pcwishlist_OptionsArray, wishlist.IDQuote,products.pcProd_BackOrder,products.formquantity, products.emailtext, products.sDesc, products.details FROM wishlist, products WHERE (((products.idProduct)=[wishlist].[idproduct]) AND ((wishlist.idCustomer)="&pIdCustomer&") AND ((products.serviceSpec)=0));"
'APP-E
set rstemp=server.CreateObject("ADODB.RecordSet")
set rstemp=connTemp.execute(query)
%><!--#include file="../includes/gbdg_CoD_inc06.asp"--><%' gbdg mod for Catalog on Demand (Edit #c7)
<% wishListTotal=Cint(0)Please replace those lines with the following:
do while not rstemp.eof
The result should be identical to the above block.Please mark this checkbox as a reminder that code edit step #C8 has been completed.
Note that while it wraps in the box above, the string "gbdgCodiRecCount = gbdgCodiRecCount + 1" and the subsequent comments are all one line without any breaks.
</div>Immediately above those lines, paste the following:
<!--#include file="footer.asp"-->
The result should look like this:
<% Session("gbdgCodCategoryName") = "Wish List" %><% gbdgShowCODbuttonWishlist 'gbdg mod for Catalog on Demand (Edit #c9) %>
</div>
<!--#include file="footer.asp"-->
/productcart/pc/showsearchresults.asp
Edit D1: Near the top of the file, locate the following statement:
<!--#include file="pcCheckPricingCats.asp"-->Immediately below that line, paste the following:
The result should look like:Please mark this checkbox as a reminder that code edit step #D1 has been completed.
<!--#include file="pcCheckPricingCats.asp"-->
<!--#include file="../includes/gbdg_CoD_inc01.asp"--> <%' gbdg mod for Catalog on Demand (Edit #d1) %>
'*******************************Immediately above the first line above, paste the following:
' START - Don't allow empty searches
'*******************************
The result should look like:Please mark this checkbox as a reminder that code edit step #D2 has been completed.
%><!--#include file="../includes/gbdg_CoD_inc02.asp"--><%' gbdg mod for Catalog on Demand (Edit #d2) %><%
'*******************************
' START - Don't allow empty searches
'*******************************
strSQL= "SELECT "& pcv_strLimitPhrase &" A.idProduct, A.sku, A.description, A.price, A.listHidden, A.listPrice, A.serviceSpec, A.bToBPrice, A.smallImageUrl, A.noprices, A.stock, A.noStock, A.pcprod_HideBTOPrice, A.pcProd_BackOrder, A.FormQuantity, A.pcProd_BackOrder, A.pcProd_BTODefaultPrice, "& zSQL &" "Replace that line with the following:
The result should look like the block above, with the understanding that the string beginning with "strsql=" is a single line. It wraps on this instruction page but in your script it MUST NOT wrap - it all goes on one long line.Please mark this checkbox as a reminder that code edit step #D3 has been completed.
totalrecords=0Immediately above that lines, paste the following:
The result should look like:Please mark this checkbox as a reminder that code edit step #D4 has been completed.
%><!--#include file="../includes/gbdg_CoD_inc05.asp"--><%' gbdg mod for Catalog on Demand (Edit #d4) %><%
totalrecords=0
totalrecords = rs.recordcountImmediately below that lines, paste the following:
The result should look like:Please mark this checkbox as a reminder that code edit step #D5 has been completed.
totalrecords = rs.recordcount
gbdgCODiRecCount = totalrecords ' gbdg mod forCatalog on Demand (Edit #d5)
<!--#include file="inc_srcPrdsCAT.asp"-->Note that there is a single instance of " " in the next to the last line. The code below needs to replace the " ".
</td>
</tr>
<%end if%>
<tr>
<td colspan="2"> </td>
</tr>
The result should look like this:After performing the specified edit, please save your changes and close showsearchresults.asp. Upload showsearchresults.asp to the PC folder.
<!--#include file="inc_srcPrdsCAT.asp"-->
</td>
</tr>
<%end if%>
<tr>
<td colspan="2"><% Session("gbdgCodCategoryName") = "Search Results" %><% gbdgShowCODbuttonSearch 'gbdg mod for Catalog on Demand (Edit #d6) %></td>
</tr>
/productcart/pc/viewcategories.asp
Edit E1: Near the top of the file, locate the following statement:
<!--#include FILE="../includes/pcCheckPricingCats.asp"-->Immediately below this, paste the following:
The result should look like:Please mark this checkbox as a reminder that code edit step #E1 has been completed.
<!--#include file="pcCheckPricingCats.asp"-->
<!--#include file="../includes/gbdg_CoD_inc01.asp"--> <%' gbdg mod for Catalog on Demand (Edit #e1) %>
<!--#include file="../includes/emailsettings.asp"--> <%' gbdg mod for Catalog on Demand (Edit #e1) %>
intIdCategory=pTempIntSubCategoryImmediately below the first line above, paste the following:
'*******************************
' START Display Settings
'*******************************
The result should look like:Please mark this checkbox as a reminder that code edit step #E2 has been completed.
intIdCategory=pTempIntSubCategory
%><!--#include file="../includes/gbdg_CoD_inc02.asp"--><%' gbdg mod for Catalog on Demand (Edit #e2) %><%
'*******************************
' START Display Settings
'*******************************
response.write dictLanguage.Item(Session("language")&"_viewCat_P_2")Immediately below those lines, paste the following:
response.write strBreadCrumb
intIdCategory=pIdCategory
The result should look like:Please mark this checkbox as a reminder that code edit step #E3 has been completed.
response.write dictLanguage.Item(Session("language")&"_viewCat_P_2")
response.write strBreadCrumb
intIdCategory=pIdCategory
Session("gbdgCodCategoryName") = pCategoryName 'gbdg mod for Catalog on Demand (Edit #e3)
query="SELECT products.idProduct, products.sku, products.description, products.price, (QUERY CONTINUES AT LENGTH)V3.12 only: Replace that line with the following:
The result should look like the block above, with the understanding that the string beginning with "query=" is a single line. It wraps on this instruction page but in your script it MUST NOT wrap - it all goes on one long line.Please mark this checkbox as a reminder that code edit step #E4 has been completed.
rs.Open query, Conntemp, adOpenStatic, adLockReadOnly, adCmdTextImmediately below those lines, paste the following:
The result should look like this:Please mark this checkbox as a reminder that code edit step #E5 has been completed.
rs.Open query, Conntemp, adOpenStatic, adLockReadOnly, adCmdText
%><!--#include file="../includes/gbdg_CoD_inc06.asp"--><%' gbdg mod for Catalog on Demand (Edit #e5) %><%
dim iPageCount, pcv_intProductCountImmediately below those lines, paste the following:
iPageCount=rs.PageCount
The result should look like this:Please mark this checkbox as a reminder that code edit step #E6 has been completed.
dim iPageCount, pcv_intProductCount
iPageCount=rs.PageCount
gbdgCODiRecCount = rs.RecordCount ' gbdg mod for Catalog on Demand - Get number of records returned for COD (Edit #e6)
'=================================Immediately below those lines, paste the following:
'end SORT BY drop-down
'=================================
%>
</tr>
The result should look like this:
'=================================
'end SORT BY drop-down
'=================================
%>
</tr>
<tr><td align="center" colspan="2"><% gbdgShowCODbuttonViewcat 'gbdg mod for Catalog on Demand (Edit #e7) %>
</td>
</tr>
<tr>Between the </tr> and the </table>, paste the following:
<td><% call PageNav(iPagecount) %></td>
</tr>
</table>
The result should look like this:After performing the specified edit, please save your changes and close viewcategories.asp. Upload viewcategories.asp to the PC folder.
<tr>
<td><% call PageNav(iPagecount) %></td>
</tr>
<tr>
<td><% gbdgShowCODbuttonViewcat 'gbdg mod for Catalog on Demand (Edit #e8) %></td>
</tr>
</table>
/productcart/pcadmin/setdropdownmenu.asp
Edit F1 (V3 stores only): Around line 212/213, locate the following statements:
mMenu.makeMenu('l0416','104','Global Changes','globalchanges.asp?nav=1','',190)Immediately below the last line, paste the following:
<% end if
end if
'BTO ADDON-E %>
The result should look like this:
mMenu.makeMenu('l0416','104','Global Changes','globalchanges.asp?nav=1','',190)
<% end if
end if
'BTO ADDON-E %>
mMenu.makeMenu('10330','103','Catalog on Demand','','',180)
mMenu.makeMenu('1033001','10330','Catalog on Demand Settings','gbdg_COD_Settings.asp','',180)
mMenu.makeMenu('1033002','10330','Export To Catalog on Demand','gbdg_COD_DBxfer.asp','',180)
/productcart/pcadmin/pcv4_navigation_links.asp
Edit G1 (V4 stores only): Locate the following statement at the very bottom of the page:
</ul>Immediately above that line, paste the following:
The result should look like this:
<!--#include file="gbdg_mods_common_admin_navigation.asp"--><%' gbdg mod %>
</ul>
/productcart/pc/header.asp
Edit H1: Locate the following statement:
</head>Immediately above that line, paste the following:
The result should look like this:
<script type="text/javascript" src="../includes/gbdg_COD_Functions.js"></script>
</head>
You have now completed all of the edits necessary for this add-on.
If you have any trouble with this installation, please email info@greybearddesign.com with all of the detail you can provide on your issue.