Post by scd1982 » Sat Apr 28, 2012 4:47 am

I'd like to find a way to change some of the default data included when creating a new product.
Specifically, I'd like to set Requires Shipping to "No", and Subtract Stock also to "No". None of the products sold in this store will require shipping options, and I'm not using the quantity field for inventory control, but still need it to have a certain, static, number filled in. Allowing the quantity to drop each time a sale is made would mess me up a bit.

I tried taking a look at the /admin/view/template/catalog/product_form.tpl and found:

Code: Select all

<tr>
              <td><?php echo $entry_subtract; ?></td>
              <td><select name="subtract">
                  <?php if ($subtract) { ?>
                  <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                  <option value="0"><?php echo $text_no; ?></option>
                  <?php } else { ?>
                  <option value="1"><?php echo $text_yes; ?></option>
                  <option value="0" selected="selected"><?php echo $text_no; ?></option>
                  <?php } ?>
                </select></td>
            </tr>
and

Code: Select all

<tr>
              <td><?php echo $entry_shipping; ?></td>
              <td><?php if ($shipping) { ?>
                <input type="radio" name="shipping" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="shipping" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="shipping" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="shipping" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
The if statements lead me to believe that there are options somewhere to set this. I just have no idea where.

I suppose I could just switch the order of the if/else options but I'm sure there's a better way.

OC Version 1.5.2.1

I usually forget to mention I'm using OC v1.4.9.4


New member

Posts

Joined
Tue Mar 27, 2012 3:57 am

Post by Etcher » Mon Apr 30, 2012 9:54 pm

The options are in the the Product>Data tab after pressing insert for a new product

If you mean change the default values of the dropdown and radio buttons on the Product>Data tab, then you can just reverse selected="selected" code on Subtract and reverse checked="checked" for Shipping. You can hard code it, but I would suggest a creating a VQMod to change it.

Code: Select all

<tr>
              <td><?php echo $entry_subtract; ?></td>
              <td><select name="subtract">
                  <?php if ($subtract) { ?>
                  <option value="1"><?php echo $text_yes; ?></option>
                  <option value="0" selected="selected"><?php echo $text_no; ?></option>
                  <?php } else { ?>
                  <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                  <option value="0"><?php echo $text_no; ?></option>
                  <?php } ?>
                </select></td>
            </tr>
and

Code: Select all

<tr>
              <td><?php echo $entry_shipping; ?></td>
              <td><?php if ($shipping) { ?>
                <input type="radio" name="shipping" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="shipping" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="shipping" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="shipping" value="0" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>

Newbie

Posts

Joined
Fri Mar 30, 2012 10:25 pm

Post by scd1982 » Tue May 01, 2012 1:16 am

OK, that's what I thought. Just checking to see if there was something I missed in the store setup similar to the defaults for the out of stock status, tax, etc.
Thanks!

I usually forget to mention I'm using OC v1.4.9.4


New member

Posts

Joined
Tue Mar 27, 2012 3:57 am
Who is online

Users browsing this forum: No registered users and 22 guests