Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2013
    Location
    Malaysia
    Posts
    12
    Plugin Contributions
    0

    Default How to Set a Default Quantity in Adding New Product?

    How to Set a Default Quantity in Adding New Product?

    so that i have less column to key in, and can add new products faster.

    Pls help

  2. #2

    Default Re: How to Set a Default Quantity in Adding New Product?

    Hi,

    The only way to do it is by editing the following file:
    /YOUR_ADMIN/includes/modules/product/collect_info.php

    Look for the following line:
    Code:
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('products_quantity', ($pInfo->products_quantity?$pInfo->products_quantity:5)); ?></td>
    Replace the line with the following
    Code:
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('products_quantity', ($pInfo->products_quantity?$pInfo->products_quantity:5)); ?></td>
    I have set the default quantity to 5, you can change the number to a different one.

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,686
    Plugin Contributions
    11

    Default Re: How to Set a Default Quantity in Adding New Product?

    both look the same and... I hope this is the same for the OP's ZC version since it was not mentioned.

    Should be around line 275 in 1.5.# but was changed in 2011 so may not work on earlier versions.

    If there are a lot of products involved, why not investigate Easy Populate? Just pick one that suits your needs. http://www.zen-cart.com/search.php?searchid=1821417
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4

    Default Re: How to Set a Default Quantity in Adding New Product?

    Hi,

    Sorry this is the proper code, now the 2 lines are not the same.

    Open the following file:
    /YOUR_ADMIN/includes/modules/product/collect_info.php

    Look for the following line:

    Code:
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td>
    Replace the line with the following

    Code:
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('products_quantity', ($pInfo->products_quantity?$pInfo->products_quantity:5)); ?></td>
    I have set the default quantity to 5, you can change the number to a different one.

  5. #5
    Join Date
    Sep 2013
    Location
    Malaysia
    Posts
    12
    Plugin Contributions
    0

    Default Re: How to Set a Default Quantity in Adding New Product?

    It works. Thank you very much

  6. #6
    Join Date
    Sep 2013
    Location
    Malaysia
    Posts
    12
    Plugin Contributions
    0

    Default Re: How to Set a Default Quantity in Adding New Product?

    responsivezc : if i want to set a default weight ?
    is this still the same file to edit ?

    i need this default weight, so that the order doesn't go to free delivery

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: How to Set a Default Quantity in Adding New Product?

    Yes, same file.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Do not show Quantity Box set as default
    By iCarp in forum Customization from the Admin
    Replies: 1
    Last Post: 5 Aug 2015, 01:17 PM
  2. v151 Can I set a default product price for creating new products in Admin?
    By mrcastle in forum Basic Configuration
    Replies: 2
    Last Post: 31 Jul 2014, 01:31 AM
  3. How to set "No, Do not show Quantity Box" to Default?
    By toussi in forum Customization from the Admin
    Replies: 9
    Last Post: 26 Feb 2010, 09:52 AM
  4. How to set a default description for 'new products'?
    By Raze in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 24 Feb 2009, 12:10 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