Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 71
  1. #51
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Removed Qty Box, now want it back for some

    Quote Originally Posted by gjh42 View Post
    Now I can see all of the original code blocks... no trace of a problem.
    Would be good to know what happened, but I'll accept just having it back. I really didn't want to have to recreate those code chunks.
    Yep, now I can see them, too. Boh... Anyway, thanks for reposting, Lalla.

    Glenn, I made the suggested code changes. As stated the price does not show. However, that does not resolve my issue because what does still show is the "Sold" image, which in my case is a "Reserved" image. What I hoped to accomplish was the elimination the Reserved or Sold image and price to create a true gallery for viewing only.

    I'm sorry, I should have been more clear. Do you know off-hand if what I'm interested in can be accomplished?

    Again, thanks so much for taking the time to help out. No matter what, that bit of code you provided will be put to use.

    Tim

  2. #52
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    550
    Plugin Contributions
    0

    Default Re: Removed Qty Box, now want it back for some

    Well, I must jump in the shower real quick... I will check back in before I fall into bed.... never knew all this code could be so exhausting!! LOL!
    If you need me to post any other quotes, let me know and I'll do it before I go to bed.

    Otherwise....
    Glenn, THANK YOU again for all of your help! I think I can actually now focus on "stocking my shelves"..... only about 40,000 more comics to go and several thousand more pins.... and then there's all the other stuff....
    wow.. I don't think even the shower is going to relax me enough to sleep! LOL!

    Have a great nite guys!

  3. #53
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    550
    Plugin Contributions
    0

    Default Re: Removed Qty Box, now want it back for some

    But.... I do have extra mouths to feed now



  4. #54
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Removed Qty Box, now want it back for some

    Awwwww.... :)

    I saw both the original code blocks and your repostings.

    Tim, I expected you would have some more elements to hide, but didn't know exactly which ones.
    You can use the same method of wrapping that test code around the output block.

    Let me know all the parts that need to go and I can tell you where to find them.

  5. #55
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Removed Qty Box, now want it back for some

    Quote Originally Posted by LilleyPadGifts View Post
    But.... I do have extra mouths to feed now



    Too cute! Congratulations!

  6. #56
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Removed Qty Box, now want it back for some

    Quote Originally Posted by gjh42 View Post
    Awwwww.... :)

    I saw both the original code blocks and your repostings.

    Tim, I expected you would have some more elements to hide, but didn't know exactly which ones.
    You can use the same method of wrapping that test code around the output block.

    Let me know all the parts that need to go and I can tell you where to find them.
    Basically I think the page as-is is good as far as presentation of product. It seems that the only other item I'd like to remove is the "Add to cart" box, which I assume would then also be the "Sold" box (or "Reserved" in my case) depending on each items individual setting via the admin.

    Using your code example, I did attempt to do this myself in tpl_product_info_display.php:

    PHP Code:
    <!--bof Add to Cart Box -->
    <?php if (!ereg("(^13$|^13_)",$cPath)) { ?><!--no image in gallery -->
    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 == 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 ?>
    <?php 
    ?><!--/no image in gallery -->
    <!--eof Add to Cart Box-->
    Not surprisingly it returned an error. Oh well - Can't blame a guy for trying.

    Is that even the right place to make the change?

  7. #57
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Removed Qty Box, now want it back for some

    What was the error?
    I suspect that, since this section contains a form input, it may not be possible to just skip it entirely.

    A refinement that occurred to me last night would put the category-specific code in only one spot and use it to set a flag that could be applied anywhere desired. This eliminates the possibility of changing a category id in one spot and forgetting it in another spot.
    PHP Code:
    <?php 
    $notGallery 
    1
    if (ereg("(^13$|^13_)",$cPath)) { /*no image in gallery*/
      
    $notGallery 0
    ?>
    Put this snippet near the top of tpl_product_info_display, say near line 16:
    PHP Code:
    <div class="centerColumn" id="productGeneral">

    <?php 
    $notGallery 
    1
    if (ereg("(^13$|^13_)",$cPath)) { /*no image in gallery*/
      
    $notGallery 0
    ?>

    <!--bof Form start-->
    PHP Code:
    <!--bof Product Price block -->
    <?php if ($notGallery) { ?><!--display if not in gallery -->
    <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>
    <?php ?><!--/display if not in gallery -->
    <!--eof Product Price block -->
    For the add to cart section, we need a different approach because we can't eliminate it. Give the div that contains the button a different id if in the gallery category, and style that id to "hidden" in the stylesheet.

    Hmm... Hold that thought. I just noticed a coding error from your post that *could* be your whole problem. Or maybe not... You replaced the opening <?php with the if test code which then closes php like this ?>. It needs to stay open here.
    Try this first:
    PHP Code:
    <!--bof Add to Cart Box -->
    <?php if ($notGallery) { /*display if not in gallery*/
    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 ?>
    <?php 
    ?><!-- /display if not in gallery -->
    <!--eof Add to Cart Box-->
    If you still get an error (probably a different one), let me know and I'll explain the stylesheet hide method.
    Last edited by gjh42; 14 May 2007 at 04:56 PM.

  8. #58
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Removed Qty Box, now want it back for some

    The good news: No Error!

    The bad news: It removed the "add to cart" storewide.

  9. #59
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Removed Qty Box, now want it back for some

    Did you get the latest bit of code at the top of my post? I was editing it probably while you were working.
    If you didn't add that part properly, it would hide all adds.

  10. #60
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Removed Qty Box, now want it back for some

    Concerning the refinement you mentioned in post #57: You have 3 snippets of code. For the second you recommended placement near line 16.

    The third snippet is replacing the original <!--bof Product Price block --> to <!--eof Product Price block -->

    As for the first bit: Does placement matter?

 

 
Page 6 of 8 FirstFirst ... 45678 LastLast

Similar Threads

  1. v138a Want Quantiy Box Instead of Buy Now Button on Specials
    By ribow in forum General Questions
    Replies: 0
    Last Post: 22 Jun 2012, 01:06 AM
  2. qty box not show with buy now buttom
    By hoang in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 4 Apr 2010, 03:27 PM
  3. Installed template, now want to go back... database problem
    By Bredpitt in forum General Questions
    Replies: 1
    Last Post: 8 Mar 2010, 07:34 AM
  4. All products listing: can I have a buy now and a qty box?
    By twiddletails in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 20 Nov 2008, 05:15 PM
  5. Removed all boxes to the left and now want to extend main page over.
    By estrange in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Jun 2007, 09:20 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