Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Customization from the Admin / Is it possible to "Add to cart" in the EZ pages?

Is it possible to "Add to cart" in the EZ pages?

Locked

Started by jottoleivi on 8 May 2009, 4:05 PM · Views: 948

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
8 May 2009, 4:05 PM
#1
jottoleivi avatar

jottoleivi

New Zenner

Join Date:
Dec 2007
Posts:
38
Plugin Contributions:
0

Post #1 by jottoleivi

I wonder if there is a possibility to "add to cart" on EZ pages. Because, when you send the customer to read "For more information, on the product's webpage" I want them to have the option to buy the product and not loose them on that page.

Help appreciated.

--Christian

8 May 2009, 7:12 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #2 by schoolboy

You can do this... as long as you make the EZPage full HTML and don't try to embed PHP into it. (This is because the contents of EZPages is stored in the database, not in files).

This is how I did it...

View the product(s) you want in a product listing page on your browser.

View the page source code.

"CLIP" the HTML code that's relevant to the desired product's "Add to Cart" <div>... eg:

<div class="centerBoxContentsProducts centeredContent back" style="width:32.5%;"><h3 class="itemTitle">
<a href="http://www.yoursite.com/index.php?main_page=product_info&cPath=274_291_293&products_id=2632">Product Title</a></h3>
<div class="listingDescription"></div><br /><a href="http://www.yoursite.com/index.php?main_page=product_info&cPath=274_291_293&products_id=2632"><img src="bmz_cache/d/df794b31f4e09643048b511e3d72593e.image.100x78.jpg" alt="Product Title" title=" Product Title " width="100" height="78" class="listingProductImage" style="position:relative" onmouseover="showtrail('bmz_cache/b/b2d3c9e22c6a98490fa5ed49912bb55a.image.280x219.jpg','Product Title',100,78,280,219,this,0,0,100,78);" onmouseout="hidetrail();"  /></a>
<br />£11.69<br /><br />
<form name="cart_quantity" action="http://www.yoursite.com/index.php?main_page=product_info&cPath=274_291_293&sort=20a&action=add_product&products_id=2632" method="post" enctype="multipart/form-data"><input type="text" name="cart_quantity" value="1" maxlength="6" size="4" /><br /><input type="hidden" name="products_id" value="2632" /><input type="image" src="includes/templates/your_template/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart " /></form>
<br /><br />
</div>

(My example includes the image and the product title, but you can just use the bit that starts <form> HTML HERE </form>)

Then you create your EZPage, toggle to HTML mode (<>) and paste this <div> where you want it.

Save the page, and off you go...

20 years a Zencart User

8 May 2009, 10:00 PM
#3
jottoleivi avatar

jottoleivi

New Zenner

Join Date:
Dec 2007
Posts:
38
Plugin Contributions:
0

Post #3 by jottoleivi

Thanks for your respons - but I seem to run into problems. I tried to find the code on the product page to insert into the EZ page - and I tried to use the code you used - but it only takes me to the page that tells me the cart is empty - or it doesn't do anything when I click on the add to cart button.

Help appreciated.

--Christian