Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Add More Fields


122 replies to this topic

#1 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 05 July 2011, 02:58

This addon allows you to easily add, and manage, fields to the products and products_description tables in the database. If you have a compatible version of Easy Populate installed, it will allow you to manage the custom fields in it too. Once installed, you don't have to edit any of your files to use the new fields, though that is possible.

Edited by Jack_mcs, 05 July 2011, 03:01.


#2 wildone

  • Community Member
  • 12 posts
  • Real Name:John

Posted 05 July 2011, 18:52

the folder 'Use_if_version_greaterthan_2.3' appears to be empty :(

#3 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 05 July 2011, 22:43

It is. A 2.3 three version hasn't been created. Only so much time.

#4 bruyndoncx

  • Community Member
  • 2,382 posts
  • Real Name:Carine Bruyndoncx
  • Gender:Female
  • Location:Belgium/ Antwerp/ Turnhout/ Arendonk

Posted 05 July 2011, 23:19

Haven't installed it yet, but the instructions on how to test the install seem to be copied from another contribution
Hava a nice day !
Carine Bruyndoncx

KEUKENLUST, Everything but the kitchensink !

#5 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 06 July 2011, 02:51

I just checked and all of the instructions apply to this contribution. Please point out that parts that seem wrong to you. Maybe I'm missing the obvious.

#6 Petra_Dutch

  • Community Member
  • 7 posts

Posted 06 July 2011, 13:16

View PostJack_mcs, on 06 July 2011, 02:51, said:

I just checked and all of the instructions apply to this contribution. Please point out that parts that seem wrong to you. Maybe I'm missing the obvious.

Bottom of the install file says:


===============================================================================
That completes the installation. To test it, first go to admin->Modules->Order Total
and install the Easy Discount module. Set the sort order to something between
those set for the sub total and tax settings. You may need to increase the sort
orders for tax and total to have it work properly. I suggest these settings:

Easy Discount 3
Shipping 2
Sub Total 1
Tax 800
Total 900

Then go to admin->Daily Specials and setup a banner. Two examples banners are
included for testing. There is a test option that will prevent the banner from
being seen by anyone but the shop owner. Once they are setup as you like, go to
admin->Configuration->Daily Specials and enable the module. Then go to your shop
to see how it appears. Instructions are provided in mouse-over popups. Just place
your mouse over the item you are interested in and a popup with instructions will
appear.
===============================================================================
The support thread is located at:
http://forums.oscommerce.com/topic/377083-add-more-fields/


Anyway Jack :) thank you very much for taking the effort for making another contribution! Going to try it today. Thanks again... Petra

#7 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 06 July 2011, 14:53

You're welcome. :)

I was looking at the code changes part of the instructions and stopped before I reached the bottom. Thanks for pointing that out. Until a new version is uploaded, the text should read:

That completes the installation. To test it, please go to admin->Catalog->Add More Fields and add a field to the database. Fields that will be displayed on the site
should be created as product description fields if your site uses multiple languages. Once you have added a field, please go to a products edit page and you should see
the new field there.

Edited by Jack_mcs, 06 July 2011, 14:55.


#8 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 07 July 2011, 01:23

A new version has been uploaded with these changes:

- Corrected the install instructions.
- Changed how auto-insert code work.
- Added code to the product_info.php page to allow the auto-insert option to work.

The biggest change is with the auto insert code. I didn't realize I forgot to add that code. It allows the new field to be updated automatically via the products description. That use is optional and requires the use of a special syntax. See the instructions in admin->Catalog->Add More Fields for an example.

#9 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 10 July 2011, 13:05

A new version has been uploaded with the following changes:

- Added error/success display when editing fields
- Changed symbols used for replacement in product_info to ##
- Fixed table changes for varchar fields

#10 Petra_Dutch

  • Community Member
  • 7 posts

Posted 18 July 2011, 13:04

Jack, Thanks again for this contribution.
I have installed the latest version and it all seems to work. I have created a new field named EAN since i want to use it to add EAN codes to the product in my store. The extra field shows in the edit product page in the admin. I can enter the EAN code in there. But then i get lost...I would like the EAN code to show as well with the product on the shop side.

I have typed ##+EAN##- into the product description of the product but on the shop side it then shows exactly (##+EAN##-)that as well.
Obviously i am misunderstanding your instructions.
Could you help me out with this?

Thanks in advance
Petra

#11 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 18 July 2011, 13:47

View PostPetra_Dutch, on 18 July 2011, 13:04, said:

Jack, Thanks again for this contribution.
I have installed the latest version and it all seems to work. I have created a new field named EAN since i want to use it to add EAN codes to the product in my store. The extra field shows in the edit product page in the admin. I can enter the EAN code in there. But then i get lost...I would like the EAN code to show as well with the product on the shop side.

I have typed ##+EAN##- into the product description of the product but on the shop side it then shows exactly (##+EAN##-)that as well.
Obviously i am misunderstanding your instructions.
Could you help me out with this?
It sounds like you are doing everything correctly. All I can think of is that the name you use in the product description is the name displayed for the new field so be sure the display name of the new field is what you are using. For example, when you crated the new field, you may have entered "ean" for the field name but "ean name" for the display name. Also, the field should be assigned to the products description table. If you assigned it the products table, then go into admin->Catalog->Add more Fields and edit it to change the table.

#12 Petra_Dutch

  • Community Member
  • 7 posts

Posted 18 July 2011, 14:21

View PostJack_mcs, on 18 July 2011, 13:47, said:

It sounds like you are doing everything correctly. All I can think of is that the name you use in the product description is the name displayed for the new field so be sure the display name of the new field is what you are using. For example, when you crated the new field, you may have entered "ean" for the field name but "ean name" for the display name. Also, the field should be assigned to the products description table. If you assigned it the products table, then go into admin->Catalog->Add more Fields and edit it to change the table.
Thanks Jack, i've used the field name in stead of the display name. Changed it into the display name and It works now!

Using this for EAN codes might not be a very good idea of me. Now i have to type in the ##+"fieldname"##- code into every product description and the actual code in the value box as well......
Must be an easier way to do this i guess..

Anyway..thanks for another great contribution. Now i have to fry my brain over how to get the EAN code, made with this contrib, intergrate with your google base feeder :)

Petra

Edited by Petra_Dutch, 18 July 2011, 14:22.


#13 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 18 July 2011, 17:07

View PostPetra_Dutch, on 18 July 2011, 14:21, said:

Thanks Jack, i've used the field name in stead of the display name. Changed it into the display name and It works now!

Using this for EAN codes might not be a very good idea of me. Now i have to type in the ##+"fieldname"##- code into every product description and the actual code in the value box as well......
Must be an easier way to do this i guess..

Anyway..thanks for another great contribution. Now i have to fry my brain over how to get the EAN code, made with this contrib, intergrate with your google base feeder :)

Petra
Using the option to add it to the products description is just a quick and easy way of getting the value of the field on the products page. For more control, you can add code to the products page to display the value wherever you want it.

#14 Petra_Dutch

  • Community Member
  • 7 posts

Posted 18 July 2011, 21:06

View PostJack_mcs, on 18 July 2011, 17:07, said:

Using the option to add it to the products description is just a quick and easy way of getting the value of the field on the products page. For more control, you can add code to the products page to display the value wherever you want it.

I will give that a try Jack. Thanks!

Petra

#15 Petra_Dutch

  • Community Member
  • 7 posts

Posted 19 July 2011, 20:48

View PostJack_mcs, on 06 July 2011, 14:53, said:

You're welcome. :)

I was looking at the code changes part of the instructions and stopped before I reached the bottom. Thanks for pointing that out. Until a new version is uploaded, the text should read:

That completes the installation. To test it, please go to admin->Catalog->Add More Fields and add a field to the database. Fields that will be displayed on the site
should be created as product description fields if your site uses multiple languages. Once you have added a field, please go to a products edit page and you should see
the new field there.

Jack, found a few tiny typos in the instructions. Nothing major. just some feedback...

point 3 in the instructions. should be: admin/includes/boxes/catalog.php
point 8 should be: product_info.php
and: FIND (around line 15):


and the last thing: the link "visit the support thread" links to the support tread of your header tags SEO support thread.

The contribution works perfect Jack. thanks!

Petra

#16 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 19 July 2011, 23:31

View PostPetra_Dutch, on 19 July 2011, 20:48, said:

Jack, found a few tiny typos in the instructions. Nothing major. just some feedback...

point 3 in the instructions. should be: admin/includes/boxes/catalog.php
point 8 should be: product_info.php
and: FIND (around line 15):


and the last thing: the link "visit the support thread" links to the support tread of your header tags SEO support thread.

The contribution works perfect Jack. thanks!

Petra
Thank you for the feedback, I do appreciate it. The changes have been made and will appear in the next version.

#17 offie

  • Community Member
  • 204 posts
  • Real Name:Michael
  • Gender:Male
  • Location:Lancashire, England

Posted 14 September 2011, 13:51

Hi Jack hope your well.

Just a quick questrion about this contribution.

What I want to do is have a box on each product page which will say either, VAT relief is available on this item or VAT relief is NOT available on this item. Ideally this would be next to the price. I have Easy Populate installed.

You can see an example on a webstore I found at;

http://www.mobilitysmart.cc/sticks-crutches-canes/crutches/closed-cuff-crutches/double-adjustable-elbow-crutches-p-14286.html
http://www.mobilitysmart.cc/wheelchair-accessories/bags/deluxe-coloured-wheelchair-bags-p-15508.html

Would this contribution do what I am after?

Thanks

#18 Jack_mcs

  • Community Member
  • 24,453 posts
  • Real Name:Jack
  • Gender:Male

Posted 14 September 2011, 18:36

It will allow you add the database field, which can then be set in the products page in admin. If you set the new field to VAT relief is available on this item or VAT relief is NOT available on this item and then add a statement to the products description to automatically include the fields data with something like ##+Name of FieldS##, it will display it as you like. If you want it to display somewhere other than the products description, then you will need to make a code change on the product page.

#19 offie

  • Community Member
  • 204 posts
  • Real Name:Michael
  • Gender:Male
  • Location:Lancashire, England

Posted 16 September 2011, 13:35

View PostJack_mcs, on 14 September 2011, 18:36, said:

It will allow you add the database field, which can then be set in the products page in admin. If you set the new field to VAT relief is available on this item or VAT relief is NOT available on this item and then add a statement to the products description to automatically include the fields data with something like ##+Name of FieldS##, it will display it as you like. If you want it to display somewhere other than the products description, then you will need to make a code change on the product page.


Thanks Jack I will give it a go

#20 booksfromhome

  • Community Member
  • 32 posts
  • Real Name:David
  • Gender:Male

Posted 27 September 2011, 03:49

Can not fint the following lines in my ADMIN/CATEGORIES.PHP

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'];