Zen Cart Logo
Forums / General Questions / How can I or remove/disable Add to Cart button?

How can I or remove/disable Add to Cart button?

Views: 3,062

Results 1 to 13 of 13
12 Feb 2014, 9:57 PM
#1
21yanks avatar

21yanks

New Zenner

Join Date:
Oct 2012
Posts:
39
Plugin Contributions:
0

How can I or remove/disable Add to Cart button?

hi i have a problem with my store. i went to admin/customer details/Customer Shop Status - View Shop and Prices and the option i choose is
number 2. i want customers to login in order to see the the price. the problem is that it does says login for price but they can still add to items to the cart very
weird?if they click add to cart it will revealed the price automatically i need help..

[IMG]http://imagizer.imageshack.us/v2/xq90/203/xq8j.jpg[/IMG]

12 Feb 2014, 10:24 PM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: How can I or remove/disable Add to Cart button?

Could be a template specific issue.

Which ZC version are you running?
Where did you obtain your template from?

And pls post a link to your site.

13 Feb 2014, 1:24 AM
#3
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: How can I or remove/disable Add to Cart button?

What you need to change:
Admin -> Configuration -> Customer Shop Status - View Shop and Prices
Admin -> Configuration -> Customer Approval Status - Authorization Pending
Admin -> Configuration -> Customer Authorization Hide Prices

What I need:
Coffee.

;)

13 Feb 2014, 4:26 AM
#4
21yanks avatar

21yanks

New Zenner

Join Date:
Oct 2012
Posts:
39
Plugin Contributions:
0

Re: How can I or remove/disable Add to Cart button?

twitchtoo:

What you need to change:
Admin -> Configuration -> Customer Shop Status - View Shop and Prices
Admin -> Configuration -> Customer Approval Status - Authorization Pending
Admin -> Configuration -> Customer Authorization Hide Prices

What I need:
Coffee.

;)

not working i am sure it has to do something with the theme :frusty:

13 Feb 2014, 4:32 AM
#5
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: How can I or remove/disable Add to Cart button?

Compare it to a stock tpl_product_info_display.php chances are you'll find the price/authorization code they removed in the template... or switch to the Classic Template see if it works properly.

13 Feb 2014, 4:55 AM
#6
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: How can I or remove/disable Add to Cart button?

21yanks:

not working i am sure it has to do something with the theme :frusty:

I'm sure it does.. Template Monstrosity template perchance???

13 Feb 2014, 5:52 AM
#7
21yanks avatar

21yanks

New Zenner

Join Date:
Oct 2012
Posts:
39
Plugin Contributions:
0

Re: How can I or remove/disable Add to Cart button?

DivaVocals:

I'm sure it does.. Template Monstrosity template perchance???

template from themeforest. the Arthur was really helpful but now is been 2 months and Arthur not active any more :(

13 Feb 2014, 5:54 AM
#8
21yanks avatar

21yanks

New Zenner

Join Date:
Oct 2012
Posts:
39
Plugin Contributions:
0

Re: How can I or remove/disable Add to Cart button?

ill look into tpl_product_info_display with the default template and compare them with winmerge to find a missing line

13 Feb 2014, 6:33 AM
#9
21yanks avatar

21yanks

New Zenner

Join Date:
Oct 2012
Posts:
39
Plugin Contributions:
0

Re: How can I or remove/disable Add to Cart button?

twitchtoo:

Compare it to a stock tpl_product_info_display.php chances are you'll find the price/authorization code they removed in the template... or switch to the Classic Template see if it works properly.
you was right tpl product info display it was missing few lines but i need to combine properly..almost done is looking pretty good take a look
http://romancecouturedresses.com/index.php?main_page=product_info&cPath=2&products_id=161

13 Feb 2014, 8:30 AM
#10
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: How can I or remove/disable Add to Cart button?

21yanks:

you was right tpl product info display it was missing few lines but i need to combine properly..almost done is looking pretty good take a look
http://romancecouturedresses.com/index.php?main_page=product_info&cPath=2&products_id=161

Thought so: template specific issue.

Do you need "Login For Price" twice?

If not then modify your stylesheet.css asf:

#productPrices {
  display: none;
  }

and

#addCart {
  font-size: xxpx; /* replace xx with your own*/
  line-height: xxpx;
  float: right;
  }
13 Feb 2014, 5:35 PM
#11
21yanks avatar

21yanks

New Zenner

Join Date:
Oct 2012
Posts:
39
Plugin Contributions:
0

Re: How can I or remove/disable Add to Cart button?

frank18:

Thought so: template specific issue.

Do you need "Login For Price" twice?

If not then modify your stylesheet.css asf:

#productPrices {
display: none;
}

> 
> and
> 
> ```
#addCart {
  font-size: xxpx; /* replace xx with your own*/
  line-height: xxpx;
  float: right;
  }

yes you are correct i will removed the extra login. now the problem is that now i have 2 quantity box one small and one larger. i did remove the small
one before but the large one looks ugly..if i add something, on the top qnty box it will not register. the larger will register products but is to big lol.

Zencart default template line i need code:

<!--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-->

Custom Code it came with the template:

<!-- Options -->
<div id="productOptions">
<div class="frame_wrap frame_wrap_header clearfix">
    <div class="fwh-title">Options</div>
</div>
<div class="frame_wrap frame_wrap_content clearfix">
    <?php
    if ($products_qty_box_status != 0 or $products_quantity_order_max!= 1) { 
        $add_quantity = '<label for="attrQuantity">' . PRODUCTS_ORDER_QTY_TEXT . '</label><input class="cart_quantity" type="number" name="cart_quantity" id="attrQuantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" min="1" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']);
        echo '<div class="prod-opt">' .$add_quantity. '</div>';
    }
    ?>
    <!--bof Attributes Module -->
    <?php
      if ($pr_attr->fields['total'] > 0) {
    ?>
    <?php
    /**
     * display the product atributes
     */
      require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
    <?php
      }
    ?>
    <!--eof Attributes Module -->
</div>
</div>

<div class="product_footer clearfix">
<?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>' : '');
?>
<?php if ($display_qty != '') { ?>
    <div id="cartAdd"><?php echo $display_qty; ?></div>
<?php } ?>

<!-- Add to cart -->
<input class="btn add2cart" type="submit" name="add_to_cart" value="<?php echo TEXT_PRODUCT_ADD_TO_CART; ?>" />
13 Feb 2014, 5:49 PM
#12
stevesh avatar

stevesh

Black Belt

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

Re: How can I or remove/disable Add to Cart button?

No one has asked the usual question: why do you want to inconvenience your visitors this way ? When I encounter a site that requires me to create an account before I can see pricing, I leave.

13 Feb 2014, 6:08 PM
#13
21yanks avatar

21yanks

New Zenner

Join Date:
Oct 2012
Posts:
39
Plugin Contributions:
0

Re: How can I or remove/disable Add to Cart button?

stevesh:

No one has asked the usual question: why do you want to inconvenience your visitors this way ? When I encounter a site that requires me to create an account before I can see pricing, I leave.

well we do this because we are wholesale sellers we don't provide one piece and we are located on lovely area of Los Angeles fashion District. we have so much competition out here, so we are force to make our clients register and more secure for us because we have their info and we provided them with a credit card authorization form.. sounds weird but i need to follow rules.