Wednesday, June 16, 2010

Fixing Cart Weaver's Archived Products page

By default, cw2 and cw3 only have search and pagination on the Active Products page. Archived Products page outputs all archived product. If you have a lot of products, this page becomes slow and useless.

To add search and paging to Archived Products page, edit cwincproductsearch.cfm and replace tbl_products.product_Archive = 0 with tbl_products.product_Archive = <cfif findnocase("archive",cgi.script_name)>1<cfelse>0</cfif> in the query at the top of the page and replace action="ProductActive.cfm" in form with action="<cfoutput>#request.ThisPage#</cfoutput>".

Now edit the productarchive.cfm and remove the rsProductsSearch query. Then add the following right below the divMainContent div:
<cfinclude template="CWIncProductSearch.cfm">
<cfoutput>#PagingLinks#</cfoutput>

No comments:

Post a Comment