Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default product info display background colour

    I want to have my add to cart, attributes, price etc all in a box together with a coloured background. I have thought about it, created a new "div id" in tpl_product_info_display, and then formatted the background colour in the stylesheet. It sort of worked, but the "div" will only encompass the price block and attributes, I can't get it to include the add to cart bit. This is my code from the tpl_product_info_display.php. The new div is clearly marked at open and close as "shoppingbox".

    PHP Code:
    <div id="shoppingbox">
    <!--bof Product Price block -->
    <h2 id="productPrices" class="productGeneral">
    <?php
    // base price
      
    if ($show_onetime_charges_description == 'true') {
        
    $one_time '<span >' TEXT_ONETIME_CHARGE_SYMBOL TEXT_ONETIME_CHARGE_DESCRIPTION '</span><br />';
      } else {
        
    $one_time '';
      }
      echo 
    $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE '') . zen_get_products_display_price((int)$_GET['products_id']);
    ?></h2>
    <!--eof Product Price block -->

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

    <!--bof Form start-->
    <?php echo zen_draw_form('cart_quantity'zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post''enctype="multipart/form-data"') . "\n"?>
    <!--eof Form start-->
    <br><br><br><br><br><br>
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      
    // do nothing
    } else {
    ?>
                <?php
        $display_qty 
    = (($flag_show_product_info_in_cart_qty == 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 == 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_CARTBUTTON_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_CARTBUTTON_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-->
    <br class="clearBoth" />
    </div><!-- #shoppingbox -->
    ps my site is here Script writers, any idea why it won't quite work? I am an amatuer but had a go!

  2. #2
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: product info display background colour

    looks ok in my end

  3. #3
    Join Date
    Dec 2009
    Posts
    204
    Plugin Contributions
    0

    Default Re: product info display background colour

    This is an old thread that helped me do exactly what you want. Clyde Jones gives very clear instructions.

  4. #4
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: product info display background colour

    great this helped thanks

 

 

Similar Threads

  1. v139h Problems with product info display background
    By barendfaber in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Aug 2012, 11:03 AM
  2. changing colour of category title on product listing and info pages
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 Jun 2010, 06:54 PM
  3. Changing back ground colour on Product Info Center Box
    By leest35 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 May 2010, 11:30 AM
  4. How to Change Background Colour to Background image
    By ittybittykitty in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Aug 2008, 04:36 PM
  5. Main Content Box Colour Vs. Background Colour
    By yoyodyne in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 6 May 2008, 02:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg