adding extra fields to the Products info

amaiko

No avatar

2007-06-29 21:09

Hi How i can add extra fields to the Products info?

» Quick.Cart v2.x

Hamza

amaiko

No avatar

2007-06-29 23:33

Hi again ,

i changed the Template " Admin for Products " , and change "products-ff.php" , "products-admin.php" ,
but it didn't work so far :(

i am reading this :
http://opensolution.org/forum/index.php?p=readTopic&nr=578
but i can't figure out this "When is the information put in this file? = when '$p=delivery', so track down that section in index.php.
What happens when $p=delivery and the form has been submitted? = code calls saveOrder function with contents of POSTed form.
What does saveOrder function do? = find it in core/orders.php ... after a bit of data manipulation it calls dbSaveOrder passing the form through again.
What does dbSaveOrder do? = all 'db...' functions are held in the '...-ff.php' files so find core/orders-ff.php and look at dbSaveOrder."

:)

Hamza

amaiko

No avatar

2007-06-30 02:37

some progress

1-The Fields added
2-The Data Added to the Flat file

after i calling Back the Form to Edit any Product the New Fields never show their contents ...

what's the file i should edit ?!

Hamza

merci

No avatar

2007-07-02 09:11

amaiko - you should edit also core/products.php function throwProduct and some functions which it uses.

amaiko

No avatar

2007-07-02 11:02

Thanks Done and working :
but some Fields taking place of other fields , as when am adding Brand , it takes Position , where i can fix it ??
core/productsff.php ?

ned

Avatar: ned

2007-07-02 12:10

Would it be better to create a new database file holding the extra information? That way the cart can be upgraded if a new version of Q.C is released as the core data remains the same..

treewood (OpenSolution)

Avatar: treewood

2007-07-02 14:30

amaiko - sorry but i am not sure that i understand You correctly. Write more about it.

ned - for this is db/products-ext.php (ext = extensions). If You want save some
new fields You must only change:
1. core/products-admin.php, saveProduct(), this -> dbAddProductExtensions( Array( $aForm['iProduct'], $aForm['sDescriptionFull'] ) );
2. core/products.php, throwProduct() and add keys to variable $aList.
3. templates/form/products_form.tpl and templates/products_details.tpl to display this fields from throwProduct() function
In products list extensions will not display

amaiko

No avatar

2007-07-03 23:01

How to add Fields in Products DB " Flatfiles "

I already done some progress , by adding the fields of what i need in

1-core/productsff.php
and changing core/products.php function throwProduct too

but newfileds already replace the older ones , as am adding Brand Name for the Product and it replace Position Field already ....

adding the fields to Products extensions Is a Great Idea and Working Perfectly

----------------
Thanks a lot Treewood and Ned ... special Thanks for Merci for the Quick Response , Keep up the great work

Hamza

Back to top
about us | contact