Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Templates, Stylesheets, Page Layout / My add to cart button is not on the same place on all pages

My add to cart button is not on the same place on all pages

Started by sarah808 on 12 Jul 2013, 8:15 AM · Views: 774

Results 1 to 8 of 8
12 Jul 2013, 8:15 AM
#1
sarah808 avatar

sarah808

New Zenner

Join Date:
Feb 2011
Posts:
12
Plugin Contributions:
0

My add to cart button is not on the same place on all pages

Please let me know how to get my Add to Cart Button to appear at the top of the page like this one

instead of at the bottom of the page like this one

I think that the problem stems from the fact that one was set up as Product-General and one as Product-Free Shipping

But I don't know where to go from there. I don't want to delete the listings and reset under the right product type because the links have been out for a while and I don't want people to not find this page any more.

Thank you

12 Jul 2013, 11:49 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: My add to cart button is not on the same place on all pages

I would guess that your tpl_product_info_display.php file was edited to move that button. If you edit tpl_free_shipping_product_info_display.php in the same way, the pages should look the same.

12 Jul 2013, 4:44 PM
#3
sarah808 avatar

sarah808

New Zenner

Join Date:
Feb 2011
Posts:
12
Plugin Contributions:
0

Re: My add to cart button is not on the same place on all pages

Where do I find that file? Thank you.

12 Jul 2013, 5:11 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: My add to cart button is not on the same place on all pages

includes/templates/template_default/templates

After editing you would save it to includes/templates/YOUR_CUSTOM_TEMPLATE_NAME/templates

15 Jul 2013, 2:57 AM
#5
sarah808 avatar

sarah808

New Zenner

Join Date:
Feb 2011
Posts:
12
Plugin Contributions:
0

Re: My add to cart button is not on the same place on all pages

Thank you for helping me find the file.
I just went to look at both tpl_product_info_display.php and tpl_free_shipping_product_info_display.php.
As far as I can see, the <!--bof Add to Cart Box --> section is in the exact same location in each file. Between

<!--bof Product description --> and <!--bof Product details list -->

Also the code inside the <!--bof Add to Cart Box --> <!--eof Add to Cart Box--> looks exactly the same on both files.
Yet on the Product-free shipping page the Add to cart button is at the bottom and on the Product-General page, the Add to cart button is at the top.

Obviously I am missing something. If you can tell me what, it would be appreciated. Thank you very much.

15 Jul 2013, 4:13 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: My add to cart button is not on the same place on all pages

Hi, I saw your post on twitter, which you tweeted after posting here.

Chances are your /includes/templates/cherry_zen/templates/ files are the culprit.
The templates there don't match the template_default versions. (Normally you'd never touch the template_default, since those are used as "masters" whenever you don't have a custom version of it inside your own active template's template folders. That's how the template-overrides system works.)

Product 69 generates output like this:```html

<!--bof Product description --> <div id="productDescription" class="freeShip biggerText"><ul><li>The Basic membership serves as your training license and is required for anyone training in any of our programs <br> One membership makes you eligible to have access to ALL of our training modules, including MMA For The Street, Battlefield Kali, Silat For The Street, BJJ For The Street and more to come. It has taken Burton Richardson decades to develop those training modules, you must show your commitment and enroll as a member. Your contribution also allows Burton to dedicate his time to further research and development. </li><li>Can purchase Quickstart curriculum DVDs and other Distance learning DVDs. </li><li> If you are a student under one of our representative, this serves as your Training License so that you are NOT obligated to purchase the curriculum DVDs </li><li>Eligible to take level tests for rank in any of our training modules</li></ul> <p> Please fill out the following form. Click SUBMIT when done. </p><p> <iframe src="https://spreadsheets.google.com/embeddedform?formkey=dERsT1RlZm9rQnZuV3Rod1NPd3pTWVE6MQ" width="608" height="3630" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe> </p><p></p></div> <!--eof Product description --> <br class="clearBoth"> <!--bof Add to Cart Box -->
  <div id="cartAdd">
Add to Cart: <input type="text" name="cart_quantity" value="1" maxlength="6" size="4"><br><br><input type="hidden" name="products_id" value="69"><input type="image" src="includes/templates/cherry_zen/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart ">          </div>
<!--eof Add to Cart Box-->

And product 99 has this very different layout: ```html
  <!--bof Add to Cart Box -->
      
    <div id="cartAdd">
    Add to Cart: <input type="text" name="cart_quantity" value="1" maxlength="6" size="2"><input type="hidden" name="products_id" value="99"><input type="image" src="includes/templates/cherry_zen/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart ">              </div>
      <!--eof Add to Cart Box-->
   <br class="clearBoth">
   </div> <!-- end of leftFloat -->
  <div id="rightFloat">
  <!--bof Product Name-->
  <h1 id="productName" class="productGeneral">Silat For The Street Teaching License</h1>
  <!--eof Product Name-->
  <!--bof Product Price block -->
  <h2 id="productPrices" class="productGeneral">
    $25.00  </h2>
  <!--eof Product Price block -->
  <!--bof free ship icon  -->
    <div id="freeShippingIcon"><img src="includes/templates/cherry_zen/images/always-free-shipping.gif" alt="Always Free Shipping" title=" Always Free Shipping " width="110" height="31"></div>
    <!--eof free ship icon  -->
  

  <!--bof Product details list  -->
    <!--eof Product details list -->
  <br class="clearBoth">
  <!--bof Attributes Module -->
    <!--eof Attributes Module -->
  </div> <!-- end of rightFloat -->
  <!--bof Product description -->
    <br class="clearBoth">
    <div id="productDescription" class="productGeneral biggerText">If you want to teach our Silat For The Street program, you can do so for by applying to become an official Silat For The Street training group.
<br>You can start teaching immediately after passing your Level 1 test. You will be listed on our website as an official group. This is a monthly fee that applies as long as you are running a Silat For The Street group. A one year commitment is required.
<br> Visit SilatForTheStreet.com for more information. 
Please fill out the application below. Click SUBMIT when done. 
<p>
<iframe src="https://docs.google.com/spreadsheet/embeddedform?formkey=dG1TTHkxWEdkMFV6blFEdFFFQXFWQ3c6MQ" width="608" height="3630" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe></p></div>
    <!--eof Product description -->

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Jul 2013, 7:56 AM
#7
sarah808 avatar

sarah808

New Zenner

Join Date:
Feb 2011
Posts:
12
Plugin Contributions:
0

Re: My add to cart button is not on the same place on all pages

Thank you for the detailed response. I looked in the cherry zen/templates folder and there wasn't any file for product-free shipping but there was one for product-general.
I copied the one from includes/templates/template_default/templates and saved it into the cherry zen/templates folder.
I made the adjustment necessary so that the Add To Cart Button would appear where I want it on the page.
This seemed to have done the trick.
Thank you both so much for helping.
Aloha, Sarah

17 Jul 2013, 10:24 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: My add to cart button is not on the same place on all pages

Well done!

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.