If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Tried to move "Add to Cart" on Product Pages - Did Not Work!

Tried to move "Add to Cart" on Product Pages - Did Not Work!

Locked

Started by candylotus on 12 Nov 2010, 9:28 PM · Views: 800

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
12 Nov 2010, 9:28 PM
#1
candylotus avatar

candylotus

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Tried to move "Add to Cart" on Product Pages - Did Not Work!

Okay,

So I tied to change where my "add to cart" button is on product pages. I edited the following file:

/includes/templates/CUSTOM/templates/tpl_document_product_info_display.php

Nothing happened.

As a side note I have all products set to display "out of stock", as I do not sell any products on the site You can see why by looking at my site https://www.kamaainadeals.com Even when I set the products to show "add to cart" button not "out of stock" button it is the same. Nothing has moved!

Any ideas?

Here's what my edited code looks like....

<!--bof Product URL -->
<?php
  if (zen_not_null($products_url)) {
    if ($flag_show_product_info_url == 1) {
?>
    <p id="productInfoLink" class="docProduct centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php
    } // $flag_show_product_info_url
  }
?>
<!--eof Product URL -->

<!--bof also purchased products module-->
<?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
<!--eof also purchased products module-->
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
  // do nothing
} else {
?>
            <?php
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
            if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
              // hide the quantity box and default to 1
              $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            } else {
              // show the quantity box
              $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            }
    $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
  ?>
  <?php if ($display_qty != '' or $display_button != '') { ?>
    <div id="cartAdd">
    <?php
      echo $display_qty;
      echo $display_button;
            ?>
          </div>
  <?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->

<!--bof Form close-->
</form>
<!--bof Form close-->
</div>
12 Nov 2010, 9:39 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

as I do not sell any products on the site
Guess I don't understand why you need the add to cart then??

Zen-Venom Get Bitten

12 Nov 2010, 9:53 PM
#3
candylotus avatar

candylotus

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

I don't! Is there some place I can get rid of it all together?

12 Nov 2010, 10:00 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

I don't! Is there some place I can get rid of it all together?
I did not see it??

Maybe a link to a page where it is displayed,,,

Zen-Venom Get Bitten

12 Nov 2010, 10:06 PM
#5
candylotus avatar

candylotus

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

Kobra,

Thanks for your help you have helped me many times. You can see what I mean here

You will notice that the out-of-stock image says "Lucky You Know". I didn't know what else to do but put a tagline for the site there. I would like for it to be gone all together...

12 Nov 2010, 10:10 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

Try
admin > config > my store > Store Status < set to either 1 or 2

Zen-Venom Get Bitten

12 Nov 2010, 10:19 PM
#7
candylotus avatar

candylotus

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

Hi Kobra,

Just tried that. It changed "more info" on the product listings page to "contact us" and also the "lucky you know" box changed to "contact us". I don't really want people to contact us (they need to contact the businesses listed on our site directly), sooo...

I still am not liking the location of the box either way. Any ideas why it did not move below the "tell a friend" and "write a review" buttons?

Was my code messed up somehow?

:(

12 Nov 2010, 10:28 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

Was my code messed up somehow?
From what you posted I see the I can not determine exactly where you have relocated it to

I have pasted the full block that you should be relocating or might try removing it

<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
  // do nothing
} else {
?>
            <?php
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
            if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
              // hide the quantity box and default to 1
              $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            } else {
              // show the quantity box
              $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            }
    $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
  ?>
  <?php if ($display_qty != '' or $display_button != '') { ?>
    <div id="cartAdd">
    <?php
      echo $display_qty;
      echo $display_button;
            ?>
          </div>
  <?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->

One can replace the call for price icon with a transparent image with the same name if that will be more to your liking

Zen-Venom Get Bitten

12 Nov 2010, 11:11 PM
#9
candylotus avatar

candylotus

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

Finally got it! was editing tpl_documents_product_info_display instead of tpl_product_info_diplay.

Silly me

12 Nov 2010, 11:13 PM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Tried to move "Add to Cart" on Product Pages - Did Not Work!

Finally got it! was editing tpl_documents_product_info_display instead of tpl_product_info_diplay.
I could not tell if you were using the document product type or not

Glad you got it

Zen-Venom Get Bitten