Jump to content
Jack_mcs

Add More Fields

Recommended Posts

Jack thanks for the response, I appreciate your time. Just clarify I can get all the fields (including those created by AMF) to shop side in product description just not in the shop side containers I have created outside it. As I said I call pull all the standard tables/fields in to my own container just not those from add more fields. From what you state does that mean the code I referred to will not pull individual fields created by add more fields?

 

Thanks for any clarification.

Share this post


Link to post
Share on other sites

Jack thanks for the response, I appreciate your time. Just clarify I can get all the fields (including those created by AMF) to shop side in product description just not in the shop side containers I have created outside it. As I said I call pull all the standard tables/fields in to my own container just not those from add more fields. From what you state does that mean the code I referred to will not pull individual fields created by add more fields?

 

Thanks for any clarification.

I don't understand what code you are referring to but when you add a field with this contribution, it is as if you went into the database and added it yourself and will work like any other field. The function added around the products description line is just for decoding the field in the description. If you want to include it elsewhere on the page, or anywhere in the site, you have to load it in from the database and format it like any other field.

Share this post


Link to post
Share on other sites

i used a clean os2.2 (i do this always to check if a contribution is working properly) i copy all the files into the right places, the adminside is working, but i dont see extra fields in the shop !!!

Share this post


Link to post
Share on other sites

i used a clean os2.2 (i do this always to check if a contribution is working properly) i copy all the files into the right places, the adminside is working, but i dont see extra fields in the shop !!!

Did you add them to the product description?

Share this post


Link to post
Share on other sites

If they are added correctly in the products descripion and you can go back and see them now, then the mistake in in the product_info.php changes. Try using the included file to test if it works.

Share this post


Link to post
Share on other sites

i ONLY used the included files

I don't know what yo suggest then. The code works fine on all of the sites I installed it into and other here are using it. So it is either something due to your server setup (unlikely) or you've made some mistake in the installation/use.

Share this post


Link to post
Share on other sites

have a OSC v2.2 RC2, runs on Hostgator server ( well know for Oscommerce hosting ) and used ONLY your files. Did it over again with the same results. The admin site is working fine, but I dont see ANYTHING on the catalog site. I have another shop wit Extra Product Fields which I insert al the code (huge one ) into and that is working properly. I would try yours because EPF is'n compactible with any Multi Images addons.

For example, if a new field has a display name of "Printer Type" and that field is set to "Epson" and you type in "%%+PRINTER TYPE%%-" (no quotes but the %%+ and %%_ are required) in the products description box, when it is saved, the products page on the shop side will display Epson.

I maked a field named Gearbox and displayname Gearbox sets as Product Description and used 3 Options ; Auto, Manual, Tiptronic. I make a new product select in gearbox Auto, saved and SEE NOTHING on the Catalog page.

When I click in the admin site on the symbol before the productname (preview) I got the next error ; 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from products p, products_description pd where p.products_id = pd.products_id an' at line 1

But when I select the same product and click on the edit button the preview page opens normaly.

Share this post


Link to post
Share on other sites

have a OSC v2.2 RC2, runs on Hostgator server ( well know for Oscommerce hosting ) and used ONLY your files. Did it over again with the same results. The admin site is working fine, but I dont see ANYTHING on the catalog site. I have another shop wit Extra Product Fields which I insert al the code (huge one ) into and that is working properly. I would try yours because EPF is'n compactible with any Multi Images addons.

For example, if a new field has a display name of "Printer Type" and that field is set to "Epson" and you type in "%%+PRINTER TYPE%%-" (no quotes but the %%+ and %%_ are required) in the products description box, when it is saved, the products page on the shop side will display Epson.

The above is not correct. You need to use the latest version.

Share this post


Link to post
Share on other sites

Actually that would be V2.3.1 (5,267,948 bytes; md5: ee581335954f64dc33167fbf949bf0c3) which works great! Every "problem" I ever had with this package was my own data entry error.

Joe


Joseph E. "Joe" Stephenson
jestep@alphanautical.com

Share this post


Link to post
Share on other sites

it work great yes, but I have the problem I can get the HTML away arround or under the images! but I think I should have to leave the 2.2 version and try to get it fixed with the 2.3. Thanks

Share this post


Link to post
Share on other sites

do you mean the OSC 2.3?

No, I mean the latest version of this contribution.

Share this post


Link to post
Share on other sites

Hi Jack, I mean that the OSC2.3 works great but I find it harder to manipulate. I have a project where I need the Extra Fields like I found working in the Extra product Fields, they also act as a filter. But I dont find a Multi Image working with this addon, that's why I tried your addon but it dont work for me.

Share this post


Link to post
Share on other sites

Hi Jack, I mean that the OSC2.3 works great but I find it harder to manipulate. I have a project where I need the Extra Fields like I found working in the Extra product Fields, they also act as a filter. But I dont find a Multi Image working with this addon, that's why I tried your addon but it dont work for me.

It's not working because you are using the wrong command. If you install the correct version and follow its instructions, it should work fine. I don't understand your comment about multi images. This has nothing to do with images.

Share this post


Link to post
Share on other sites

Hi

I installed and can add new fields but not sure how to use it, or is it simply an admin replacement of adding a field by going directly to sql.

 

Q::: should the added field show up on Admin panel, Configuration, Product Listing, so that I can decide to or not to show it on the shop front? E.g. I added a field called Size, and I want it to show up next to Product Name on my shop http://lifeome.com/index.php/cytokines-c-23

can this be done with the field or do I have to do some coding (which is not what I am capable:()?

 

I tried to add fields to Products or Product Description types, but none is doing anything. Are they just "secret" fields in my database? (not that I don't have a use of it).

 

Suggestion: Can someone add a detailed "How to use" kind of file to the contribution (for laymen like me)?

 

 

chao

Share this post


Link to post
Share on other sites

Hi

I installed and can add new fields but not sure how to use it, or is it simply an admin replacement of adding a field by going directly to sql.

 

Q::: should the added field show up on Admin panel, Configuration, Product Listing, so that I can decide to or not to show it on the shop front? E.g. I added a field called Size, and I want it to show up next to Product Name on my shop http://lifeome.com/index.php/cytokines-c-23

can this be done with the field or do I have to do some coding (which is not what I am capable:()?

 

I tried to add fields to Products or Product Description types, but none is doing anything. Are they just "secret" fields in my database? (not that I don't have a use of it).

If it installed correctly, you can go to the add new fields section in admin and add a new field. That field will be like any other field in the database and can be used where you like. If you use the special syntax mentioned in the instructions, you can dusplay the contents of the new field in the product description. If you want it to display somewhere else, like by the product name as you mention, then you have to edit the prodcut_info.php file to load the field in and display it as you want.

Share this post


Link to post
Share on other sites

Hi Jack,

 

Thank you for your reply!

 

I am not technically advanced to edit the product_info.php on my own to display the new fields on web. Do you know if there is any contributions to display newly added fields to the Admin>Config>product listing options area so I can select to show or not?

 

Also, there is somewhere the codes may not be clean. After installation, tried to add/delete a field called "size". then I used EasyPopulate to download the products, there is a column v_size_1 in the downloaded file and then it prevented the file from uploading because the size field is invalid. I browsed the sql database for the size column, I could not find it. Could it be that when adding/deleting a new field and check the EP, it actually modify the EP files and that's where the traces of "size" is left?

 

Thanks,

chao

Share this post


Link to post
Share on other sites

I am not technically advanced to edit the product_info.php on my own to display the new fields on web. Do you know if there is any contributions to display newly added fields to the Admin>Config>product listing options area so I can select to show or not?

 

Also, there is somewhere the codes may not be clean. After installation, tried to add/delete a field called "size". then I used EasyPopulate to download the products, there is a column v_size_1 in the downloaded file and then it prevented the file from uploading because the size field is invalid. I browsed the sql database for the size column, I could not find it. Could it be that when adding/deleting a new field and check the EP, it actually modify the EP files and that's where the traces of "size" is left?

There is another contribution that adds extra fields but I don't think it adds to the product listing options, though I could be mistaken. I think it is called Extra Fields, or something like that. You can do a search for it and then ask in its support thread before installing it.

 

I'm not aware of any problem with this contribution not woking with Easy Populate, though that is always possible.

Share this post


Link to post
Share on other sites

I don't understand what code you are referring to but when you add a field with this contribution, it is as if you went into the database and added it yourself and will work like any other field. The function added around the products description line is just for decoding the field in the description. If you want to include it elsewhere on the page, or anywhere in the site, you have to load it in from the database and format it like any other field.

 

I thought I should just come back to this and say thanks, I hadn't included the field "p.name" in the "$product_info_query = tep_db_query" line. Basic -stupid me.

 

Thanks again.

Share this post


Link to post
Share on other sites

Hi Jack,

 

First of all i just want to say thanks very much for your great (add ons)contributions that you have created or refurbished for sharing them to everyone and also for the support that you give for them. cheers!

 

i have a question regarding the install instruction for V2.3 and up.

one is this instruction below:

 

________________________________________________________________________

FIND (around line 470):

 

} elseif (tep_not_null($HTTP_POST_VARS)) {

$pInfo->objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

 

ADD BENEATH:

 

/**** Begin Add More Fields ****/

$addedFieldsArray = GetAddedProductFields($_GET['pID'], $_GET['cPath']);

$addMoreFieldsArray = array();

if (count($addedFieldsArray) > 0) {

foreach ($addedFieldsArray as $field) {

$addMoreFieldsArray[$field['field_name']] = $_POST[$field['field_name']];

}

}

/**** End Add More Fields ****/

 

 

________________________________________________________________________

 

I cannot find this code below for me to add the above code underneath it anywhere in the admin/categories.php even on a fresh untouched oscommerce V2.3 files.

 

} elseif (tep_not_null($HTTP_POST_VARS)) {

$pInfo->objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

 

Same as the instructions below:

 

________________________________________________________________________

FIND (around line 756):

 

} elseif ($action == 'new_product_preview') {

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

 

 

REPLACE WITH:

 

 

Thanks Jack.

I think Jack recommend WinMerege

 

I had major problems as the install instructions for modifications had a few "issues", and I totally lost my categories in admin following the mod instructions.

 

Solution:

Like WinMerege, I used Notepad++, with the plugin "compare" that you can add to Notepad++

 

Then I opened the categories.php file that came with the Fields download, and compared it to my current categories.php (which also had the AJAX manger installed). I essentially just copied all the differences in my original file over to the new one, and then uploaded

 

problem solved, and my blood pressure fell back to normal...

 

Notepad is great for searching/finding items as well whgen making changes

Edited by ErikMM

Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Share this post


Link to post
Share on other sites

two issues/questions I have not seen yet in the thread:

 

1. Do I have to have "Easy Populate" installed? as there is warning "Easy Populate is not installed"

 

2. the pop up is not found when clicking Explain options in admin, but the popup file exists in the right location, suggestions?

Edited by ErikMM

Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×