Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Changing Layout of Product Page

    Fo the wishlist try here:
    http://www.zen-cart.com/forum/showth...light=wishlist

    I don't mind at all. If you run into problems please contact me.

    Just remember, when you start to move things around be sure to move EVERYTHING between the <!--bof xxxxxxx --> and <!--eof xxxxxxxx ->

  2. #12
    Join Date
    Aug 2006
    Posts
    51
    Plugin Contributions
    0

    Default WebSite Rob

    Hi Rob,

    Your page is what I need to do. I simply want to add the previous-listing-next at the top and also move the ADD TO CART to the bottom of the page next to the write a review and tell a friend.

    How do I make the changes and where to move the ADD TO CART box and add the previous-next?

    Thanks in advance,
    Dave

  3. #13
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: WebSite Rob

    Hi Dave,

    includes/templates/template_default/templates/tpl_product_info_display.php

    What I did was rearranged the code to have things display where I wanted. The above file is the default one so make sure to put in your 'custom' dir. if using Template overrides.

  4. #14
    Join Date
    Aug 2006
    Posts
    51
    Plugin Contributions
    0

    Default Re: Changing Layout of Product Page

    Hi Website Rob,

    I am such a novice at the coding aspect. I think I found the code:

    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
    // do nothing
    } else {
    ?>
    <?php
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 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 == 0 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_CART, BUTTON_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_CART, BUTTON_IN_CART_ALT);
    }
    $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
    ?>

    But what do I need to change to make the ADD TO CART appear at the bottom of the page and the quanity in stock to be hidden? I see the previous/next is already set for the top.

    This is all Russian to me!!!!

    Can you tell me how to translate the Russian code to English to change the location of the ADD TO CART (bottom of the page) and how to hide the quanity in stock?

    Thanks so much. I know us morons must drive you crazy with return posts after you answered our previous posts. We need a little hand holding. :*)

    Thanks again in advance,
    Dave

  5. #15
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Changing Layout of Product Page

    OK looks like you've found the first step.
    Code:
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      // do nothing
    } else {
    ?>
                <?php
        $display_qty = (($flag_show_product_info_in_cart_qty == 1 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 == 0 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_CART, BUTTON_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_CART, BUTTON_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-->
    Next in the same file find:
    Code:
    <!--eof Reviews button and count -->
    Now cut everything from <!--bof Add to CartBox --> and <!--eof Add to CartBox --> and paste it below <!--eof Reviews button and count -->

    Save the file to YOUR_TEMPLATE -> templates folder and then upload to your server.

  6. #16
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Changing Layout of Product Page

    I pretty much did as described by Clyde.

    - Moved down all code inbetween <!--bof Add to Cart Box --> and <!--eof Add to Cart Box -->
    put code for 'Add to Cart' option below all product information and options.

    - Moved up all code inbetween <!--bof Product details list --> and <!--eof Product details list -->
    TEXT_PRODUCT_MODEL
    TEXT_PRODUCT_WEIGHT
    TEXT_PRODUCT_QUANTITY
    TEXT_PRODUCT_MANUFACTURER

    - Added in line breaks <br /> at various places for nicer look.

  7. #17
    Join Date
    Aug 2006
    Posts
    51
    Plugin Contributions
    0

    Default Website Rob

    Hi Rob,

    I moved the ADD TO CART the way you described and then starting turning off boxes to get the layout the way I wanted, but when I went to check the ordering I encountered a problem.

    I do a test order and then click add to cart and it goes to a screen saying Shopping Cart is Empty when I just ordered.

    I have looked everywhere for something I might have shut off, but must be overlooking something.

    Could it be in the code I used when I moved the ADD TO CART?

    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
    // do nothing
    } else {
    ?>
    <?php
    $display_qty = (($flag_show_product_info_in_cart_qty == 0 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 == 0 or $products_quantity_order_max== 0) {
    // hide the quantity box and default to 1
    $the_button = '<input type="hidden" name="cart_quantity" value="0" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_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_CART, BUTTON_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><div align="center">
    <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->

    I do not have any clue and read through every FAQ in the tutorial.

    Please let me know what you think it could be.

    Thanks,
    Dave

  8. #18
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Website Rob

    Without a URL it's hard to tell what the problem could be.

    From the code you posted though, this is different:
    </div><div align="center">

    Where did the 'align=center' come from and do you have a closing div somewhere?

  9. #19
    Join Date
    Aug 2006
    Posts
    51
    Plugin Contributions
    0

    Default Re: Changing Layout of Product Page

    Yeah, I tried to center the ADD TO CART button, but I just deleted the <div align="center">

    I do not know if you can see why it does not work by going to the shopping cart page:

    http://pageallaboutit.com/order/inde...&products_id=1

    You might see some code in the source that could help me out. I appreciate you taking a moment to translate the Russian code and see how I screwed it up.

    Dave

  10. #20
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Changing Layout of Product Page

    This is from the stylesheet and controls the position of the add to cart button.

    #cartAdd {
    /*float: right;*/ try deleting this.
    text-align: center;
    margin: 1em;
    border: 1px solid #000000;
    padding: 1em;
    }

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v150 Changing the layout of my product information page
    By OLCS in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 28 Jun 2012, 08:48 PM
  2. Changing layout of product page-How?
    By QuickInks in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 7 Feb 2009, 10:06 PM
  3. Problems changing layout of "add to shopping cart" box on product listing page
    By crashley1784 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 May 2008, 07:29 PM
  4. Changing product page layout
    By Orchard_Direct in forum Templates, Stylesheets, Page Layout
    Replies: 34
    Last Post: 5 Feb 2008, 09:42 AM

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