Page 1 of 1

Removing Add to Cart button

PostPosted: Mon Jun 04, 2012 4:29 pm
by azrac
Most of the web sites don't have Add to Cart button before the More Info Page. I am trying to remove it. I was looking at the same topic on this forum... but it didn't help. Here is my Custom Product Template. Please let me know what should I delete in order to remove Add to Cart button. Thank you.

[-- DEFINE PRODUCT --]
[-- IF PRODUCT.Graphic --]
[-- IF PRODUCT.DisplayMoreInformationPage --]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
[-- END_IF --]
<br>

[-- IF PRODUCT.DisplayMoreInformationPage --]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
[-- PRODUCT.Name --]
[-- END_IF --]

<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
[-- IF PRODUCT.DisplayPrice --]
<br>
[-- IF PRODUCT.VariablePrice? --]
<b>[--STORE.Price --]:</b> [-- STORE.CurrencySymbol --]<input type=text name="[-- PRODUCT.RecordNumber --]:price" size="4" maxlength="10" value="">
[-- ELSE --]
[-- IF PRODUCT.SaleAmount --]
<strike>[-- PRODUCT.Price --]</strike>
[-- PRODUCT.SaleAmount --] [-- STORE.OnSaleText --]
[-- ELSE --]
[-- PRODUCT.Price --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]
[-- PRODUCT.ProductDescription --]
[-- IF PRODUCT.DisplayOrderQuantity checked --]
<br>Quantity <input type="text" size="2" name="[-- PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
<br>

[-- IF PRODUCT.DisplayOrderingOptions --]
<span class="opt_hdr">[-- PRODUCT.OptionText --]</span>
[-- Order_Option_Menu Column --]
[-- END_IF --]
[-- IF ADDIMAGE? --]
<input class="add" type="image" [--ADDIMAGE--]>
[-- ELSE --]
<input class="add" type="submit" value="[-- ADDTEXT --]">
[-- END_IF --]
</form>
[-- END_DEFINE PRODUCT --]
[-- DEFINE PRODUCT_CROSS_SELL --]
[-- INCLUDE cross-sell-default.sst PROCESS --]
[-- END_DEFINE PRODUCT_CROSS_SELL --]
[-- DEFINE MORE_INFO_PAGE --]
<!DOCTYPE html>

<html>
<head>
<title>[--IF PRODUCT.MoreInformationTitle--][--PRODUCT.MoreInformationTitle--][--ELSE--][--PRODUCT.Name REMOVE_HTML--][--END_IF--]</title>
<style type="text/css">
ul
{
list-style-type:none;
margin:0;
padding:0;
}
li
{
display:inline;
}
</style>
</head>
[--INCLUDE PortmanteauHeader PROCESS--]
<table border = "0" width="80%" align="center">
<tr>
<td><table align="center" width="100%">
<tr>
<td align="center">
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post">
[-- IF PRODUCT.MoreInformationGraphic --]
[-- MoreInfoImageRow --]
[-- END_IF --]
[-- IF PRODUCT.Subproduct --]
[-- ELSE --]
[-- INCLUDE Product-Sku PROCESS --]
[-- END_IF --]
<p class="ProductDescription">[-- PRODUCT.MoreInformationText --]</p>
[-- IF PRODUCT.VariablePrice? --]
[-- IF PRODUCT.VariableName? --]
<span class="VariableProductName">
[-- STORE.ProductName --]: <input type=text name="[-- PRODUCT.RecordNumber --]:name" size="20" maxlength="100" value="">
</span>
[-- ELSE --]
<span class="ProductName">[-- PRODUCT.Name --]</span>
[-- END_IF --]
[-- ELSE --]
<span class="ProductName">[-- PRODUCT.Name --]</span>
[-- END_IF --]
[-- IF PRODUCT.QuantityPricing --]
[-- ELSE --]
[-- INCLUDE Product-Price PROCESS --]<br />
[-- END_IF --]
[-- INCLUDE Product-AddToCartButton PROCESS --]
</form></td>
</tr>
</table>

[-- IF Product.MoreInformationProductCrossSell --]
[-- IF PRODUCT.CrossSell "0" --]
[-- ELSE --]
<table class="pcs_table">
<caption>[-- STORE.CartCrossSellHeader --]</caption>
[-- LOOP Product_Cross_Sell 3 --]
<td class="gcs_table_content">[-- PRODUCT_CROSS_SELL --]</td>
[-- END_LOOP Product_Cross_Sell --]
</table>
[-- END_IF --]
[-- END_IF --]
[-- IF Product.MoreInformationGlobalCrossSell --]
<table class="gcs_table">
<caption>[-- STORE.GlobalCrossSellHeader --]</caption>
[-- LOOP GLOBAL_Cross_Sell 3 --]
<td class="gcs_table_content">[-- GLOBAL_CROSS_SELL --]</td>
[-- END_LOOP Global_Cross_Sell --]
</table>
[-- END_IF --]


</td>

</tr>
</table>
<table border = "0" width="80%" align="center"><tr><td><hr/></td></tr></table>

[--INCLUDE PortmanteauFooter PROCESS--]


</body>
</html>
[-- END_DEFINE MORE_INFO_PAGE --]

Re: Removing Add to Cart button

PostPosted: Tue Jun 05, 2012 8:08 am
by Jim
I for one dislike having to go to multiple pages in order to get to a button where I can order a product, so I like add to cart buttons on the first page where a product is displayed.

As for what you have to remove, that depends on what you want to display on the page.
The whole section from this line
Code: Select all
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post">

down to these lines
Code: Select all
[-- END_IF --]
</form>

contains the add to cart section of the product. However, in this template it also includes the Price, Sale Price, Product description and ordering options in addition to the add to cart button or text.

So how much of that do you want to display on the main page?

Re: Removing Add to Cart button

PostPosted: Tue Jun 05, 2012 8:56 am
by azrac
Hi Jim, maybe you are right about having "add to cart" on the first page... but I am going for a clean look. I want image displayed and underneath the name of the product and underneath the price.

Re: Removing Add to Cart button

PostPosted: Tue Jun 05, 2012 9:31 am
by Jim
Will this template only be used for this type of products, i.e. always have just image, name, price on the first screen?
I assume that your products will always have an image assigned?
Will you be using Variable price products?
Will you have sale prices and if so do you want them displayed on the first page along with the original price?
I assume that product ordering options and description will always be on the More Info page and never the initial page?

Re: Removing Add to Cart button

PostPosted: Tue Jun 05, 2012 1:30 pm
by Jim
Given that my assumtions in the previous post are valid, ie, only product image (which each product will have) , product name and base price are displayed, you could replaces the [-- DEFINE PRODUCT --] section that you posted with the following. (Note you still need your DEFINE MOREINFOPAGE section and I didn't look at it all and have not included it in this reply for space reasons.)
Code: Select all
[-- DEFINE PRODUCT --]
[-- IF PRODUCT.DisplayMoreInformationPage --]
    <a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>
    <a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
   [-- PRODUCT.Graphic --]
   [-- PRODUCT.Name --]
[-- END_IF --]
[-- PRODUCT.Price --]

[-- END_DEFINE PRODUCT --]

If you want to be able to have the variable price, sale price option then you would replace the [-- PRODUCT.PRICE --] with this.
Code: Select all
[-- IF PRODUCT.DisplayPrice --]
  [-- IF PRODUCT.VariablePrice? --]
    <b>[--STORE.Price --]:</b> [-- STORE.CurrencySymbol --]<input type=text name="[-- PRODUCT.RecordNumber --]:price" size="4" maxlength="10" value="">
  [-- ELSE_IF PRODUCT.SaleOn --]
      [-- IF PRODUCT.SaleAmount --]
       <strike>[-- PRODUCT.Price --]</strike> [-- PRODUCT.SaleAmount --] [-- STORE.OnSaleText --]
      [-- END_IF --]
  [-- ELSE --]
    [-- PRODUCT.Price --]
  [-- END_IF --]
[-- END_IF --]

Re: Removing Add to Cart button

PostPosted: Tue Jun 05, 2012 4:47 pm
by azrac
Jim, I will always have an image, name and a price. And yes I would want to have sale price there as well, in case I put something on sale.
Description, size and color (clothes) will go on the more Info Page.
Thank you.

Re: Removing Add to Cart button

PostPosted: Tue Jun 05, 2012 9:27 pm
by Jim
Try this (use your old moreinfo page define)
Code: Select all
[-- DEFINE PRODUCT --]
[-- IF PRODUCT.DisplayMoreInformationPage --]
    <a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>
    <a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
   [-- PRODUCT.Graphic --]
   [-- PRODUCT.Name --]
[-- END_IF --]
[-- IF PRODUCT.SaleOn --]
      [-- IF PRODUCT.SaleAmount --]
       <strike>[-- PRODUCT.Price --]</strike> [-- PRODUCT.SaleAmount --] [-- STORE.OnSaleText --]
      [-- END_IF --]
 [-- ELSE --]
       [-- PRODUCT.Price --]
 [-- END_IF --]
[-- END_DEFINE PRODUCT --]