Post by maderstrains » Wed Nov 11, 2009 11:10 am

Im stuck here trying to figure out how to change a few defaults for the item entry. Im talking about when entering a new item under the "products". I was able to change the default for the Sales Sax, but im stuck with the others.

The first default i would like to change is the QTY default. It is currently at "1" and i would like to set the default for "0"

The next one i would like to change is the Out of Stock Status Default. It is currently at "out of stock" and i would like to set the default as "Available, 7-10 Business Days" (I have created this option under the "stock status" in the localization menu)


What do i need to do to the coding to change these defaults?

Those are the 2 for now i would like to change. Thanks in advance for the help.

Josh Mader
Maders Trains
http://maderstrains.com/


Active Member

Posts

Joined
Sat Jun 06, 2009 1:31 am
Location - Rancho Santa Margarita, Cali

Post by jamieleshaw » Wed Nov 11, 2009 11:27 am

To change the default qty in 1.3.4.
goto file admin/controller/catalog/product.php
then line 695 and set the quantity there.
this should work in 1.3.2 too
i'm not too sure on stock

Active Member

Posts

Joined
Sun Jul 26, 2009 11:19 am

Post by maderstrains » Wed Nov 11, 2009 12:02 pm

jamieleshaw wrote:To change the default qty in 1.3.4.
goto file admin/controller/catalog/product.php
then line 695 and set the quantity there.
this should work in 1.3.2 too
i'm not too sure on stock
Thank you Jamie!! That one worked and its now changed ;D

Now i just need to know how to change the stock status one

Josh Mader
Maders Trains
http://maderstrains.com/


Active Member

Posts

Joined
Sat Jun 06, 2009 1:31 am
Location - Rancho Santa Margarita, Cali

Post by jamieleshaw » Wed Nov 11, 2009 12:37 pm

For Changing the default out of stock status when inserting a product
1. got to your database manager (Might be phpmyadmin) select opencart db look for something called stock_status
then browse it entrys and next to your custom stock status there should be a stock status id
2. open the file admin/controller/catalog/product.php in an editor goto line 707
and change

Code: Select all

$this->data['stock_status_id'] = $this->config->get('config_stock_status_id');
to

Code: Select all

$this->data['stock_status_id'] = 4;
change 4 to the stock status id you retrieved from step1.
Voila! :)

Active Member

Posts

Joined
Sun Jul 26, 2009 11:19 am

Post by maderstrains » Wed Nov 11, 2009 3:07 pm

Jamie, your awesome!! Thank you so much!!

Josh Mader
Maders Trains
http://maderstrains.com/


Active Member

Posts

Joined
Sat Jun 06, 2009 1:31 am
Location - Rancho Santa Margarita, Cali

Post by jamieleshaw » Wed Nov 11, 2009 3:12 pm

Your welcome!

Active Member

Posts

Joined
Sun Jul 26, 2009 11:19 am

Post by maderstrains » Mon Apr 26, 2010 12:45 am

I have another question regarding changing defaults....

I just re-installed (had to re-install after switching hosting services) and upgraded to version 1.4.7 and i need to change some defaults again when adding a new product. They including:

~~Quantity (need to change this from 1 to 0)
~~Tax Class (need to change this from "None" to my Tax Class I created)
~~Length Class (need to change this from centimeter to inch)
~~Weight Class (need to change this from kilogram to pound)

Can someone help me with changing each of these in version 1.4.7?

Josh Mader
Maders Trains
http://maderstrains.com/


Active Member

Posts

Joined
Sat Jun 06, 2009 1:31 am
Location - Rancho Santa Margarita, Cali
Who is online

Users browsing this forum: No registered users and 63 guests