Post by emphaze » Fri Mar 22, 2019 10:40 pm

Hello everybody,

Due to some circumstances I have to temporary remove the "Add to cart" button (I wanna keep the site as catalog until I deal with problem). The simplest way to do so is to comment out the button code from the respective .tpl files and I managed to do so everywhere, except on "Product" pages. I commented out this part in product.tpl

Code: Select all

  <!-- <div class="cart-block"> 
            <div class="form-group"> 
              <label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label> 
              <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="form-control" /> 
              <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> 
              
              <button type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary btn-lg btn-block"><?php echo $button_cart; ?></button> 
			 </div> 
			 <span>- OR -</span> 
			 <div class="btn-group">  
			
            <div class="wishlist"><button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i><?php echo $button_wishlist; ?></button></div> 
            <div class="compare"><button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product_id; ?>');"><i class="fa fa-exchange"></i> <?php echo $button_compare; ?> </button></div> 
         </div> -->   
and also

Code: Select all

<!-- <div class="button-group"> 
					 <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span><?php echo $button_cart; ?></span></button> 
					   
					 <div class="wishlist"> <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button></div> 
					 <div class="compare"><button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button></div> --> 
but it doesn't seem to help - the button (and the entire group with wish list and compare are still there). What I'm doing wrong or perhaps I'm missing some point? Thank you very much for your help and suggestions in advance!

PS. I'm attaching image of the group I want to disable.

Attachments

add1.JPG

add1.JPG (248.67 KiB) Viewed 8413 times


Newbie

Posts

Joined
Fri Mar 22, 2019 9:48 pm

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by emphaze » Sat Mar 23, 2019 1:36 am

Thank you for your reply, but I'm not looking for extensions as they are template dependent. My logic is that if the code is still executed (despite the lines being commented out), then it should be running from somewhere else. The question is how can I identify which file in particular contains the code? Is there any way to show the paths?

Newbie

Posts

Joined
Fri Mar 22, 2019 9:48 pm

Post by xxvirusxx » Sat Mar 23, 2019 2:27 am

Depend what theme..
You can easily open all tpl files in Notepad++ and search for "cart"..

PS. And don't forget to refresh ocmod, clear vqmod cache (if you used) after made changes in tpl files.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by emphaze » Sat Mar 23, 2019 4:44 pm

Once again, thank you very much for your suggestions! Cleared all the caches - system, image, vqmod - worked like a charm!

Newbie

Posts

Joined
Fri Mar 22, 2019 9:48 pm
Who is online

Users browsing this forum: No registered users and 46 guests