Okay 2 concerns here.
1. I'd like to remove the add to cart button from category pages, and only be visible at the product page.
2. Making a custom checkout button just for product page (If you can give me like a test CSS code with a temp display buttom)
1. edit the catalog/view/theme/default/template/product/category.tpl file and remove the code for the button
in 1.5.1.3 it is
2. Please answer these few questions
do you want to retain the add to cart button and have a checkout button next to it ?
or do you want to replace the add to cart button with a checkout button ?
in 1.5.1.3 it is
Code: Select all
<div class="cart"><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a></div>
do you want to retain the add to cart button and have a checkout button next to it ?
or do you want to replace the add to cart button with a checkout button ?
edit: catalog/language/yourlanguage/product/product.php
add a new define
edit: catalog/controller/product/product.php
find
add before
edit: catalog/view/theme/yourtheme/template/product/product.tpl
find 2 x occurrences of
change both occurrences to
find
change to
edit: catalog/view/javascript/common.js
find
change to
add a new define
Code: Select all
$_['button_place_order'] = 'Place Order';
find
Code: Select all
$this->data['button_cart'] = $this->language->get('button_cart');
Code: Select all
$this->data['button_place_order'] = $this->language->get('button_place_order');
find 2 x occurrences of
Code: Select all
$button_cart
Code: Select all
$button_place_order
Code: Select all
$('.success').fadeIn('slow');
$('#cart_total').html(json['total']);
$('html, body').animate({ scrollTop: 0 }, 'slow');
Code: Select all
location.href = 'index.php?route=checkout/checkout';
find
Code: Select all
$('.success').fadeIn('slow');
$('#cart_total').html(json['total']);
$('html, body').animate({ scrollTop: 0 }, 'slow');
Code: Select all
location.href = 'index.php?route=checkout/checkout';
[quote="uksitebuilder"]1. edit the catalog/view/theme/default/template/product/category.tpl file and remove the code for the button
in 1.5.1.3 it is
Hi
I've tried this but I just get 'null' where the button was ?
www.lemoniedesigns.co.uk
thanks
in 1.5.1.3 it is
Code: Select all
<div class="cart"><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a></div>
I've tried this but I just get 'null' where the button was ?
www.lemoniedesigns.co.uk
thanks
You will also need to remove the following from the javascript section at the bottom of the page
and
Code: Select all
html += ' <div class="cart">' + $(element).find('.cart').html() + '</div>';
Code: Select all
html += '<div class="cart">' + $(element).find('.cart').html() + '</div>';
Who is online
Users browsing this forum: No registered users and 364 guests