Forums / Customization from the Admin / How to change default values on "create new product"-page?

How to change default values on "create new product"-page?

Views: 3,280

Results 1 to 9 of 9
5 Apr 2007, 2:52 PM
#1
crosswraith avatar

crosswraith

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

How to change default values on "create new product"-page?

I did a bit searching in the Tutorials and in the forums but wasn't able to find anything related. I'm a bit unsure about what terms to search for, so I start this thread.

I'd love the possibility to change the default calues whilst creating new products.
For example add a default value to some of the fields, have other radio buttons checked as default, and so on.

I guess there is 1 file that can be edited, or it is a combination of files?
Which files are these? Is it as easy as to simply change true to false or 0 to 1?

Being able to do this easily would help me save time when adding many new products that require similar settings.

Any pointer is greatly appreciated! :cool:

ZenCart? Oh yeah sure!

5 Apr 2007, 3:05 PM
#2
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: How to change default values on "create new product"-page?

I don't know for sure what page to edit either. so we'll have to work through it together.

what program do you use to edit php code?

I use dreamweaver, or notepad++

To figureout what to search for i use Firefox browser with the web developer addon from www.mozilla.com

bring up the page to add a product, and then us the information menu in the web developer, and choose display id & classes

This will give you the name of the div, or class that makes everything show up.

now search for one of the id's that pop up near one of the fields.

that should lead you to the right page to add the default value. now all we have to do is find out what code to use in order to have that default value to show up.

John Patrick
A Zen Cart Advocate!

5 Apr 2007, 5:55 PM
#3
crosswraith avatar

crosswraith

New Zenner

Join Date:
May 2006
Posts:
76
Plugin Contributions:
0

Re: How to change default values on "create new product"-page?

birdoasis:

I don't know for sure what page to edit either. so we'll have to work through it together.

what program do you use to edit php code?

I use dreamweaver, or notepad++
Until now I used any editor I could get hold off, but I'm always looking for better alternatives.

To figureout what to search for i use Firefox browser with the web developer addon from www.mozilla.com

Yeah I use this extension for FireFox as well, and just love it. It saves you loads of time, and I highly recommend this tool to any webdesigner. :yes:

I managed to change some of the fields that I mentioned previously very easily
in the file
called: collect_info.php
that resides in: admin/includes/modules/product/

I'm still trying to find out how I can change the default Tax Class in the drop down to something else. Anyone achieved this yet?

ZenCart? Oh yeah sure!

9 Apr 2007, 10:05 AM
#4
mbeale avatar

mbeale

New Zenner

Join Date:
Dec 2006
Posts:
12
Plugin Contributions:
0

Re: How to change default values on "create new product"-page?

Hi

Thanks for this post - i've been trying to work out for ages if its possible to 'preset' to Product Qty field to a value...

Also thanks for the FF addon for developers... how good is that!

thanks alot

9 Apr 2007, 10:39 AM
#5
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: How to change default values on "create new product"-page?

crosswraith:

Yeah I use this extension for FireFox as well, and just love it. It saves you loads of time, and I highly recommend this tool to any webdesigner. :yes:

Get Firebug as well - THAT is as brilliant as the Developer Tool Kit; even better for quickly locating what class is where.

I'm still trying to find out how I can change the default Tax Class in the drop down to something else. Anyone achieved this yet?

admin > catalog > product types > product general ... edit layout ... Product Price Tax Class Default - When adding new products? Set accordingly (it's a bit "trial and error" while you find out what the numerical value of your required tax class is)

PS Buy the manual unless my sig applies...which it clearly doesn't! :laugh:

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

9 Apr 2007, 6:12 PM
#6
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Location:
Helsinki
Posts:
477
Plugin Contributions:
0

Re: How to change default values on "create new product"-page?

umm could someone still explain to me how to edit collect_info...

I'd need to set up Products Quantity Box Shows to false by default..

I'm trying to hide all the fields I don't need from the product add page since we don't need them and they are confusing to our other admin users..
basicly I'd need to set every radio button to default and hide them... also manufacturer etc since we have only one.. Can it be done?

many thanks!

9 Apr 2007, 7:33 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to change default values on "create new product"-page?

You could just flip the switch in the Customization ... Product Info ...

Product Quantity Box Status - Adding New Products
What should the Default Quantity Box Status be set to when adding New Products?

0= off
1= on
NOTE: This will show a Qty Box when ON and default the Add to Cart to 1

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 May 2010, 11:36 AM
#8
snagroot avatar

snagroot

New Zenner

Join Date:
Apr 2010
Posts:
4
Plugin Contributions:
0

Re: How to change default values on "create new product"-page?

Hi Guys,

I have tried editing the file:
C:\wamp\www\admin\includes\modules\product_music\collect_info.php

I changed the default product name to:
$parameters = array('products_name' => 'xxxx',

and I changed the default sort order to 7:
'products_sort_order' => '7'

However, when I try add a new music product in Admin:
'new product' button clicked and select 'Product - Music' , then these modified default values I set are not there?

I also tried editing all the other collect_info.php files but it makes no difference when I try adding a new product, the default values are not changing! :frusty:

Please help?

14 Jun 2011, 6:49 AM
#9
sohotech avatar

sohotech

New Zenner

Join Date:
Mar 2008
Posts:
13
Plugin Contributions:
0

Re: How to change default values on "create new product"-page?

There is a file called collect_info.php under /admin/includes/modules/product

At the start of the file an array of all the form values is initialized.

I think you can just add default values there. I added one I needed and it seems to work.

If anyone knows why this is a bad idea let me know by replying to this posting.

I do think that you should be able to do this within the admin menu structure but I cant find this option. If anyone knows how to do it in the admin back-end also let me know.