You are here:  » New field

Support Forum



New field

Submitted by wdekreij on Thu, 2007-01-11 12:59 in

Hi :-)

I want to add an extra field, next to "name", "description" etc.. I know how to set it up in the SQL, but what do I need to change in the PT-script to make this work?

Thanks in advance,

Wilco de Kreij

[b]Edit:[/b] Just in case: I just grabbed the original admin.php & feeds_register_step2.php, copy-pasted all your codes from that other topic and changed "tariff" into "dagen" and "Tariff" into "Dagen".. And guess what? Didn't work :(

Submitted by support on Thu, 2007-01-11 13:36

Hi Wilco,

Check the following thread for all the details for adding a new field to the database and admin scripts etc...

http://www.pricetapestry.com/node/313

Cheers,
David.

Submitted by wdekreij on Sat, 2007-01-13 16:42

I have done exactly what you did there (I copy-pasted your code and change "tariff" to "dagen" as it suppose to be (and yes, I added "dagen" and "field_dagen" in the SQL (in the right table)...

But..

When I'm trying to register (and import) a feed it doesn't get imported or registered.. I don't get an error either, I'm just going back to the main admin-screen (with non-registered feeds)..

How to fix this?

Submitted by support on Sat, 2007-01-13 16:49

Hello Wilco,

There are lots of minor changes required in the admin scripts and in includes/admin.php - particularly where the fields are passed through to the register script. I think this may be where your problem is...

Double check all your changes in includes/admin.php. If everything looks OK there; double check admin/feeds_register_step2.php to make sure that all the parameters are included in the call to admin_register() (line 63)...

Cheers,
David.

Submitted by wdekreij on Sat, 2007-01-13 17:53

Well :-) I already did and I can't find it.. First, I tried to modify it by myself, after reading your first post. Didn't work.. Then I tried to modify it, reading your 2th post (with all the details).. Didn't work.. Then, I modifyed it by copy-pasting all your codes.. Didn't work.. After each step I double-checked it, so in fact I three-double-checked it but can't find it :(

Does it matter after which field the new field stands in the SQL database? I placed "field_dagen" right after "user_brand" (in "feeds") and "dagen" right after "brand" (in "products").

Submitted by support on Sun, 2007-01-14 00:24

Hello Wilco,

The order is important because of the way the SQL is setup. Can you send me by email the following files (as attachments) and I will take a look at your changes:

includes/admin.php
admin/feeds_register_step2.php

If you reply to you registration code or forum reg email is the easiest way...

Cheers,
David.

Submitted by wdekreij on Sun, 2007-01-14 11:06

Thank you, David :-) I just mailed you the 2 php files + screenshots of my database.

Thanks in advance!

Submitted by wdekreij on Sun, 2007-01-14 22:34

Thnx david!

Apperently something was wrong with my SQL, I imported the original SQL (delivered with Price Tapestry) again and it all worked out well :-)

Thanks again!