Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2009
    Posts
    7
    Plugin Contributions
    0

    help question Showing Add to Cart button, and Categories/SubCategories expanded on Index

    I apologize in advance if there is a post about this topic particularly, but I spent twenty minutes searching and couldn't find anything that solved my issue. I've tried to note everything I can. Thanks so much in advance for any help you can provide, as I'm doing this for a client and about to explode from the stress of getting an eCommerce site up and running for them in such a short time.

    My issue is that my product pages have no "Add to Cart" or "Buy Now" button of any type. It doesn't necessarily need to have both, but it should have at least one obviously. Note that Buy Now is listed when browsing Categories and seeing a product listing in that view, but not when viewing the actual product page itself.

    For example, check out this product page, and you'll see there's no way to buy the product. But when you view the source:

    Code:
    <!--bof Add to Cart Box -->
                  <!--eof Add to Cart Box-->
    Empty. So when we take a look at the way I have the product page set up behind the scenes, it looks like this.

    In the long run what I'm trying to accomplish is to create items which have infinite stock and stock isn't subtracted when they're purchased, and customers should be able to add as many to the cart as they wish. Thanks again for any help you can provide, and if you happen to know how I could set the Categories on the main page to already be expanded to show SubCategories, I would really appreciate it!




    Also, some more information:

    Zen Cart 1.3.8a

    Database Patch Level: 1.3.8

    v1.3.8 [2009-09-02 08:21:57] (Fresh Installation)
    v1.3.8 [2009-09-02 08:21:57] (Fresh Installation)

    Server OS: Linux 2.6.20.2mtv8

    HTTP Server: Apache/2.0.54
    PHP Version: 4.4.8 (Zend: 1.3.0)
    PHP Memory Limit: 99M
    PHP Safe Mode: Off
    PHP File Uploads: On Max Size: 2M POST Max Size: 8M
    Database Data Size: 216 kB Database Index Size: 313 kB
    Database: MySQL 5.1.26-rc-5.1.26rc

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Showing Add to Cart button, and Categories/SubCategories expanded on Index

    That obviously looks wrong. You need to have a look at a file:

    includes/templates/yourtemplate/templates/tpl_product_info_display.php

    This is the file that produces the heart of the product info page.

    You will easily find the bit between the two comment lines that you have quoted. If you want you could post the section between those comments for us to have a look.

    I believe there is a mod that expands the category tree. I'll have a look now...

    Have a look at:

    http://www.zen-cart.com/forum/showthread.php?t=65443
    Last edited by niccol; 1 Oct 2009 at 09:50 PM.

  3. #3
    Join Date
    Oct 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Showing Add to Cart button, and Categories/SubCategories expanded on Index

    Certainly, and thanks for the quick reply! Let me know what you think. I purchased this theme from someone for a starting point and have been editing it to my liking but I haven't touched this file. I'm also checking out the link you posted about that mod, thanks!

    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 = '<br /><span>' . PRODUCTS_ORDER_QTY_TEXT . '</span><div style="margin-top:0;">
    	
    	
    	<br /><table><tr><td style="padding-top:0px;" class="padd1"><input type="text" name="cart_quantity" class="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '</td><td style="padding-top:0;">
    	
    	
    	&nbsp;&nbsp;' . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) .' </td></tr></table></div><br />';
                }
        $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
      ?>
      <?php if ($display_qty != '' or $display_button != '') { ?>
      
      
             
             <div id="cartAdd">
        <div class="cartAdd_indent">
        
        <?php
          echo $display_qty;
          echo $display_button;
                ?>
                
                
            </div>
            </div>
            
              
      <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Showing Add to Cart button, and Categories/SubCategories expanded on Index

    OK. Well that is the standard code so that is good.

    In admin>>configuration>>my store>>store status

    what have you got?

  5. #5
    Join Date
    Oct 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Showing Add to Cart button, and Categories/SubCategories expanded on Index

    0. Forgot to mention that.

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Showing Add to Cart button, and Categories/SubCategories expanded on Index

    Also, what have you got in :

    admin >> configuration >> customer details >> Customer Shop Status - View Shop and Prices

  7. #7
    Join Date
    Oct 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Showing Add to Cart button, and Categories/SubCategories expanded on Index

    0 also.

    Thanks for the continued support, Nick. This is baffling to me.

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Showing Add to Cart button, and Categories/SubCategories expanded on Index

    This was sorted out by reverting to the default version of the tpl_product_info_display.php file rather than the version included in the template.

 

 

Similar Threads

  1. add a +/- button to collapse categories/subcategories?
    By BMcPuffin in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 18 Apr 2012, 06:18 AM
  2. Add to cart button and quantity textbox not showing
    By atgeorge in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 19 May 2009, 05:12 AM
  3. How to display expanded subcategories on clicking categories
    By bindaaz in forum Customization from the Admin
    Replies: 2
    Last Post: 2 Mar 2008, 04:25 PM
  4. All categories and subcategories expanded
    By sambinomio in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 30 Nov 2006, 07:27 AM
  5. customize categories and subcategories index pages
    By etoile03 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 25 Oct 2006, 07:27 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR