Results 1 to 8 of 8
  1. #1
    Join Date
    May 2009
    Posts
    32
    Plugin Contributions
    0

    Default Changing Cart Quantity box width

    I can't seem to see this anywhere. Presently it's 4 characters wide. I really only require 2. Is there a way to change it?

  2. #2
    Join Date
    Nov 2004
    Posts
    77
    Plugin Contributions
    0

    Default Re: Changing Cart Quantity box width

    you can either edit the file itself which would be tpl_product_info_display.php or tpl_product_music_info_display.php

    on or about line 101 find

    Code:
     $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);
    and look for maxlength="6" size="4" and change the size to 1 or 2.

    ideally however you will want to remove both and control the input via your style sheet and set your exact width of the field there.
    Dan - statuscontrols.com/web
    web programming and design

  3. #3
    Join Date
    May 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Changing Cart Quantity box width

    Hi,

    Thanks, However...I modified both files just changing the size value but the box stayed the same 4 character width.

  4. #4
    Join Date
    Nov 2004
    Posts
    77
    Plugin Contributions
    0

    Default Re: Changing Cart Quantity box width

    if your comfortable you can pm me temp ftp details and I can make the changes for you.
    Dan - statuscontrols.com/web
    web programming and design

  5. #5
    Join Date
    May 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Changing Cart Quantity box width

    Hi Dan,

    I would if I could but the site is still a-building on my local computer.

    I guess it's just not a matter of modding those two files?

    David

  6. #6
    Join Date
    Nov 2004
    Posts
    77
    Plugin Contributions
    0

    Default Re: Changing Cart Quantity box width

    should be, if i were you id just remove

    size="4"

    from that line,

    then add this to your stylesheet.css

    #cartAdd input { width:25px; }

    and adjust as needed.
    Dan - statuscontrols.com/web
    web programming and design

  7. #7
    Join Date
    May 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Changing Cart Quantity box width

    Thanks. I'll give it a try and report back.

  8. #8
    Join Date
    May 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Changing Cart Quantity box width

    OK nothing worked but I ran a grep on size="4" and found that I could narrow the quantity display field by modifying

    C:\server\xampp\xampp\htdocs\store\includes\modules\pages\shopping_cart\header_p hp.php

    at line 139 to say size="1"

    It's still not quite as narrow as I'd like it but it's a lot better.

 

 

Similar Threads

  1. changing cart width on 1.3.9d
    By sonat in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Sep 2010, 10:52 PM
  2. Changing width on qty box?
    By KismetDesign in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 17 Dec 2009, 09:55 PM
  3. Changing width of top search box
    By timotheos in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Feb 2007, 09:27 PM
  4. Add To Cart box width
    By kappaluppa in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Feb 2007, 05:39 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