Totally Zenned
- Join Date:
- Jan 2009
- Posts:
- 2,085
- Plugin Contributions:
- 0
Assigning a Class to button_in_cart.jpg
I'm having some trouble on a site I'm working with at https://www.superfancy.co.uk
The Add to Cart button doesn't have a class of it's own, so it's impossible to style the button individually, without affecting the entire #addCart class
I'm basically trying to add padding to the image, button_in_cart.jpg so that it'll line up properly with the #productAttributes
I've been trying to assign a class to the button in button_names.php like this:
define('BUTTON_IMAGE_IN_CART', '<span class="AddtoCartButton">button_in_cart.jpg</span>');
........however, as soon as I upload that, it replaces the add to cart button with the BUTTON_IN_CART_ALT, "add to cart".....
So, I tried editing the BUTTON_IN_CART_ALT in the same file to this:
define('BUTTON_IN_CART_ALT', '<img src="http://www.superfancy.co.uk/shop/includes/templates/freetemplate2/buttons/english/button_in_cart.jpg" class="AddtoCartButton">');
...... but that doesn't work either as it just displays the code instead of the image..... which is odd as the exact same method works for me with other images I've generated from the ALT defines....
Can anyone tell me how to add a class to the button_in_cart.jpg image? I've looked at the tpl_product_info.php file and I can see the PHP code that's generating the image, but how would I assign a class to the button in PHP??
$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);