Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Location
    Canada
    Posts
    50
    Plugin Contributions
    0

    Default Product Page Price, quantity, order button layout

    Desperately looking for help here.
    I抳e rearranged everything else on the product page but now I抦 stuck. And after hours of attempting to rearrange the code in tpl_product_info_display.php a cry for help is the only option.

    What I want to rearrange is the price [quantity box] add to cart button
    into one line and when an item is already in the shopping cart the Quantity in shopping cart notice underneath instead of in the middle of it.

    The site: www.mllem.com/mademoiselle_m

    This I what is looks like now:



    This is what I would like to get:



    If there is an attribute selection:



    change to display like this:




    so to elimate the Please Chose: and what is not visible in this image if there was an quantity box it would be between the price and the attribute.


    The present code for that section in tpl_product_info_display.php is:

    PHP Code:
    <!--bof Product Price block -->
    <p 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']);
    ?></p>
    <!--eof Product Price block -->

    <!--my change of place for add to cart box-->
    <div id="buybox">
    <!--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="4" size="3" /><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-->


    <!--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 -->
    can someone please, please please help
    thanks
    nev

  2. #2
    Join Date
    May 2008
    Location
    Alconbury, UK
    Posts
    27
    Plugin Contributions
    0

    Default Re: Product Page Price, quantity, order button layout

    I've been trying to figure out the same thing. What is up with the add to cart button??! Why is it so darned hard to move??

  3. #3
    Join Date
    Nov 2007
    Location
    Canada
    Posts
    50
    Plugin Contributions
    0

    Default Re: Product Page Price, quantity, order button layout

    ok it doesn抰 seem like I can easily get the attributes where I want them.. to many div-s in the attribute template.. so for now above will have to do

    got rid of the last few remaining <br/> and enclosed everthign in one div and
    pasting the php code I butchered to get the 1st part to display in one line with the quantity in cart line under it (image 2), can someone who actually has at least some idea about php (unlike me) have a look at it .. and hopefully tell me how to fix potentially dangerous bits of code that are left dangling or anything else I might have done wrong specially the

    $display_qty = (($_SESSION['cart']->in_cart($_GET['products_id'])) ? '' . '' : ''); part

    PHP Code:
    <!--my change of place for add to cart box-->
    <div id="buybox">
    <!--bof Product Price block -->
    <p 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>';
      } 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']);
    ?></p>
    <!--eof Product Price block -->


    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      
    // do nothing
    } else {
    ?>
                <?php
        $display_qty 
    = (($_SESSION['cart']->in_cart($_GET['products_id'])) ? '' '' '');
                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="4" size="3" />' zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' 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 != '') { ?>
    <!--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 -->  
        <!--take out div ref<div id="cartAdd">-->
        <?php
          
    echo $display_qty;
          echo 
    $display_button;
                
    ?>
                
                
          <?php
        $display_sh 
    = (($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>' '');
        
    ?>
        <?php
          
    echo $display_sh;
                
    ?>
              
        <!--take out cartAdd div ref</div>-->  
      <?php // display qty and button ?>
    <?php 
    // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->
    thanks for any help
    nev

  4. #4
    Join Date
    May 2008
    Posts
    1
    Plugin Contributions
    0

    新加的空白文章1

    Is real? Ha

 

 

Similar Threads

  1. v151 Fixed quantity price per order quantity
    By bztek in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 7 Feb 2014, 05:30 PM
  2. In product price by attribute selected and quantity button disapper from add to cart
    By ronaldlb in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 14 Feb 2011, 05:08 PM
  3. Layout for price, add cart and etc in Product Layout page
    By sgspeer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Aug 2010, 09:43 PM
  4. Change layout order on product page
    By eecom in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Dec 2007, 03:04 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