Zen Cart Logo
Forums / All Other Contributions/Addons / Numinix Product Fields

Numinix Product Fields

Views: 12,420

Results 41 to 60 of 69
8 Nov 2015, 5:26 PM
#41
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Numinix Product Fields

bislewl,

Thanks for filling this gap of information.
Notageek

8 Nov 2015, 7:03 PM
#42
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Hi. On restoring to my original zen cart to prepare for another installation attempt of Numinix Product Fields, I am looking at the issue of whether I need to be concerned about overrides, for future upgrades. In a thread at https://www.zen-cart.com/showthread.php?217545-Adding-a-field-to-Category-Products-page-Can-this-been-done&highlight=overrides+numinix+product+fields, it says at post #8:

  1. The above can be accomplished through the use of a plugin designed specifically to add new product fields. (Numinix additional fields)
  2. The above modifies files that will be overwritten on an upgrade or require merging, but many of those changes can be in a separate file that will not be overwritten on an upgrade. Ie template override directory instead of template_default.)
  3. Language files are not used in cases where the template displays text information. This may not be a problem for a specific site, but if the audience is expanded or in the case of others reading this thread, ideally the construct of a site using ZC should meet those standards. It also becomes easier to maintain consistency throughout as one can change the text in one place and see the result everywhere used.

Then, at post 10, it says:

  1. Indicated that there was a potential "problem" with the way it was implemented, but I was attempting to offer some of the solution, which negates the concern in all cases except the collect_info.php, preview_info.php, and update_product.php files which being admin files do not currently have template overrides. (I think/thought that ZC 1.6.0 was going to lead more to that possibility.) I haven't looked in a while, but even the changes needed there may be able to be made outside of the files themselves using an observer class to account for the additional fields.

I know I am overthinking this, but after slogging through what Niminix says is a 10-15-minute install over 3 days, I thought maybe I need to ask what the correct process is when uploading the MODIFIED_CORE_FILES which include the ollect_info.php, preview_info.php, and update_product.php files. What does the fact that these are admin files have to do with the "override" concept, or lack of an "overrides" directory?

The instructions say:

Either copy the files in the MODIFIED_CORE_FILES or merge the changes of the included files

Is this giving me a choice of overwriting the core files with the same name, or going to Winmerge and inserting code by hand? Why would I ever do the latter if I can do the former? What concept am I missing here?

Secondly, the next instruction says:

File uploads will be saved to the media directory so make sure that exists
Just curious, but what does this sentence mean? What uploads is this referring do? Easy Populate uploads, perhaps? As you can see, I have a very vague understanding of what is going on here, so I appreciate tolerance for such questions.

Notageek

8 Nov 2015, 8:00 PM
#43
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Hi. Just to keep the record straight, I am thinking that, in answer to my own question as to why not just copy instead of merging the core files, I am guessing that if I have made no prior changes to those particular files it would be okay to just copy the modified core files.

I am not sure why there is no instruction on making an override directory, though.

As I am always in a hurry, I went ahead and tried to again copy the Numinix Product Fields files into my WAMP server zen-cart test store. When I got to my Your_Admin files, I was again presented with the message "Cannot Copy Files." I had not recalled that it just wouldn't copy, so that is why I had to track down the long-file-path limitation in Windows, and had tried the renaming of the files which seemed to enable them to be copied into the Admin directory after I renamed the Your_Admin file, and then applied the install.sql.

I had asked on the Numinix website support about this problem and on 11/6 received this response:

Assuming you cannot use the automatic install option for each optional field, you would need to use the install.sql inside each of those directories. Manual installation was never intended which is why we don't have instructions for it.
So, I am thinking that maybe when belewl installed this module on a WAMP server in the past, perhaps it was a different version so that the npf files with the too-long path names had shorter path names at that time.

I would like to use the subst command, recommended by Microsoft, and can input this command into the "start, run" screen, but I do not know what to do with it after the shorter path is created:

Use The Subst Command To Assign A Drive Letter To A Specific Folder
You can substitute a specific folder path with a drive letter using the Windows Command Prompt (Start > All Programs > Command Prompt) and the subst command. The command follows the format:

subst <driveletter> <folder path>
For example, if you wanted to the folder path C:\Example\File\Path with the drive letter Y, you would enter:

subst Y: C:\Example\File\Path
Now the Y: drive is "mapped" directly to the folder. Since you have substituted most of the long file path with Y:, it no longer violates the character limit. You can now move the files out of this folder to a folder with a shorter file path.

After you move the files, you can delete the virtual drive by running the subst command with the /d parameter. To delete the Y: drive created in the example above, enter:

subst Y: /d
The above quote is from: http://support.code42.com/CrashPlan/4/Troubleshooting/Windows_File_Paths_Longer_Than_255_Characters.

Alternatively, someone suggested this on a forum at this location: http://serverfault.com/questions/232986/overcoming-maximum-file-path-length-restrictions-in-windows

For this too-long path: C:\Folder1\Really Long Path\Such Recursion\So Deep\Wow\Still Going\I will run out of ideas soon\I have organizational problems\Obsessive compulsive subdirectory disorder\Here is a guid for no good reason\936DA01F-9ABD-4d9d-80C7-02AF85C822A8\Almost there\Tax Returns\2013\2013_tax_return.pdf

I've been taking an approach similar to subst by using directory junctions, which may be more convenient to cleanup if you're just looking to make a few quick changes. I use Link Shell Extension, but you can just use the mklink command like so: mklink /J C:\Wow "C:\Folder1\Really Long Path\Such Recursion\So Deep\Wow". – juntalis Sep 27 at 3:10

I also do not understand how this would then be implemented when trying to then copy the folders from admin into the WAMP server, i.e., would all the folders be first copied into the C:/wow folder and then YOUR_ADMIN renamed from that folder would be able to be copied and pasted into the WAMP test site?

Thanks for looking at these options.
Notageek

13 Nov 2015, 8:26 PM
#44
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Hi. Solved the long path problem, and I suppose the forums I read on long path names were tackling different problems. With a Zen Cart file path, it is an easy fix.

I simply copied the Numinix Product Field module directly to my C drive. That removed about 126 characters from the path in My Documents where I had copied the module, and I was able to go to the npf_includes and copy it directly into the admin, includes file, intact. Because of the advice that the module installs automatically so that it is not intended to rename YOUR_ADMIN in the prebuilt folders, I did not rename any of the YOUR_ADMIN files in the prebuilt folders. The same was applied to the install.sql files, it was not meant to install them as in this version they install automatically, so I did not implement the install.sql.

I did also check, file by file, to see if everything was copied into the correct folders, and I did find that there was a file which had vastly, inexplicably misplaced itself, and fixed that. I also initially received an error in the log file which related to the fact that I had renamed old NPF module folders, and needed to delete those, instead.

Now, I finally can see these fields in the Catalog dropdown in Admin, when I select Numinix Product fields.

Hooray. Thanks to belewl, and also Jeff at Numinix, for giving me enough clues to get me through this to the point where I had hope of success, and finally a clear enough understanding to forge ahead and complete the install.

I hope this helps someone.

13 Nov 2015, 9:15 PM
#45
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Hi. Back again with another problem. This is on a rebuild to bring my site up to version 1.5.4. Of course, this is regarding efforts to install the Numinix Product Fields module.

When I try to activate one of the prebuilt modules, I receive a message: > The selected field was unable to be installed due to insufficient server permissions, please contact your host.
I checked the properties of the folders, and they all do say read only, but the PHP files do not say read only.

When I try to change the permissions on the folders, it gives me the menus to do so and press apply and ok, but the folders' read only permissions never change.

This is on a WAMP server on my computer running Windows XP.

Does someone understand this permissions error?

Thanks.

Notageek

13 Nov 2015, 9:28 PM
#46
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Numinix Product Fields

notageek:

Hi. Back again with another problem. This is on a rebuild to bring my site up to version 1.5.4. Of course, this is regarding efforts to install the Numinix Product Fields module.

When I try to activate one of the prebuilt modules, I receive a message:
I checked the properties of the folders, and they all do say read only, but the PHP files do not say read only.

When I try to change the permissions on the folders, it gives me the menus to do so and press apply and ok, but the folders' read only permissions never change.

This is on a WAMP server on my computer running Windows XP.

Does someone understand this permissions error?

Thanks.

Notageek

ok... Just to be clear you shouldn't be running windows XP and it isn't PCI compliant...

you need to make sure your YOUR_ADMIN/includes/npf_includes/ and all sub directories have write permissions. You might need admin access to change it to make them write permissions.

14 Nov 2015, 2:00 AM
#47
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Thanks for the tip, bislewl. I found that in Windows folders remain read only, but the php files are writeable, so since I have admin permissions in Windows and log in to the WAMP server as admin, that source of permissions seems not applicable.

Since the debug was circular starting with a command not appearing in the Tableau template at line 100,

[13-Nov-2015 23:12:08 UTC] PHP Warning: DOMDocument::load(): Empty string supplied as input in C:\wamp\www\musicstudiostore\includes\templates\tableau\templates\tpl_index_default.php on line 100
(this line says: $xml_test = $xmlDoc->load($xml);)

[13-Nov-2015 23:12:08 UTC] PHP Stack trace:

[13-Nov-2015 23:12:08 UTC] PHP 1. {main}() C:\wamp\www\musicstudiostore\index.php:0

[13-Nov-2015 23:12:08 UTC] PHP 2. require() C:\wamp\www\musicstudiostore\index.php:97

(This line 97 says: require($template->get_template_dir('tpl_main_page.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_main_page.php');
?>)
[13-Nov-2015 23:12:08 UTC] PHP 3. require() C:\wamp\www\musicstudiostore\includes\templates\tableau\common\tpl_main_page.php:201

(Line 201 says: require($body_code); ?>)

[13-Nov-2015 23:12:08 UTC] PHP 4. require() C:\wamp\www\musicstudiostore\includes\modules\pages\index\main_template_vars.php:366

(This line 366 says: require($template->get_template_dir($tpl_page_body, DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . $tpl_page_body);
)
[13-Nov-2015 23:12:08 UTC] PHP 5. DOMDocument->load() C:\wamp\www\musicstudiostore\includes\templates\tableau\templates\tpl_index_default.php:100
(this goes back to where we started)

and ending with that same command, I reinstalled the optional_catalog in the Numinix Product Fields module. I was hoping it was a template problem, as I had not yet reinstalled the optional files.

I then went through all of the catalog files and the modified core files again, and found yet another file I had not copied.

The UPC module still won't install, and still says I don't have permission to install it. But I have a clue: Whereas previously in Admin, Configuration, I was able to see that files were saved in the "Media" file, I do not see that message now. So it looks like I have a configuration file problem. However, the config file does appear in
admin/includes/auto-loaders/config.numinix_product_fields.php.

What else could this message mean: "The selected field was unable to be installed due to insufficient server permissions, please contact your host"?

Maybe it is coming up due to repetitive tries to add it, and somehow is going to require that I uninstall and reinstall everything.

Thanks for any thoughts.

14 Nov 2015, 2:22 AM
#48
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Numinix Product Fields

You need to be able to change the permission of that folder. If not you will need to manually create the files and run the SQL.

The error you have above is un-related to the issue with NPF. However is related to Tableau, it appears you don't TABLEAU_BLOG_RSS_URL defined in the admin

14 Nov 2015, 2:33 AM
#49
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

bislewl,

Thanks. I was just returning to see what you had said about that Tableau error earlier. I'm not sure what to put in for the RSS feed, or if I can put it in at this stage.

I forgot to mention that I was able to add the Continental Shipping module, so I felt at that point that I did have the appropriate permissions. I looked for hours on a way to change the folder permissions and was only able to find an instruction that the folders themselves could not be writeable, but the files in them would be changed to writeable if I tried to change permissions, and that did seem to be the case.

I was also able to add the date_added field, although that one does not require the install.sql as Numinix advised it was just making an existing field changeable.

So I have spent all day on this, my fifth day on this module, and so maybe I can just try to solve the Tableau RSS feed addition, if you are possibly able to tell me what to do with that at this point. I think I might have to wait until I put the site online to go any further with either of these problems.

It's just odd that the configuration menu worked to show the "media" location when I first installed this module, and doesn't work now.

Thanks for the quick reply.

Notageek

14 Nov 2015, 3:52 AM
#50
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Numinix Product Fields

notageek:

bislewl,

Thanks. I was just returning to see what you had said about that Tableau error earlier. I'm not sure what to put in for the RSS feed, or if I can put it in at this stage.

I forgot to mention that I was able to add the Continental Shipping module, so I felt at that point that I did have the appropriate permissions. I looked for hours on a way to change the folder permissions and was only able to find an instruction that the folders themselves could not be writeable, but the files in them would be changed to writeable if I tried to change permissions, and that did seem to be the case.

I was also able to add the date_added field, although that one does not require the install.sql as Numinix advised it was just making an existing field changeable.

So I have spent all day on this, my fifth day on this module, and so maybe I can just try to solve the Tableau RSS feed addition, if you are possibly able to tell me what to do with that at this point. I think I might have to wait until I put the site online to go any further with either of these problems.

It's just odd that the configuration menu worked to show the "media" location when I first installed this module, and doesn't work now.

Thanks for the quick reply.

Notageek

Try 2 things.

  1. Reverting to the "old"/core YOUR_ADMIN/configuration.php
  2. In almost all the numinix modules installers in the YOUR_ADMIN/includes/init_includes/init##########_.php files there is a line usually around line 10, that looks like: (this is from NPF)
$zencart_com_plugin_id = 1495; // from zencart.com plugins - Leave Zero not to check

Change it so so $zencart_com_plugin_id = 0

Sometimes on WAMP zencart has issues connecting to zen-cart.com to verify plugin. I think this is resolved in upcoming ZenCart v1.5.5

1 Dec 2015, 4:03 AM
#51
bubbadood avatar

bubbadood

New Zenner

Join Date:
Mar 2012
Location:
NJ
Posts:
49
Plugin Contributions:
0

Re: Numinix Product Fields

I'm having the exact issue as the previous poster

The selected field was unable to be installed due to insufficient server permissions, please contact your host.

I have tried the suggested corrections but cannot seem to find the issue. Any help would be appreciated, I'm using 1and1 as my host, not sure where the log files are that I can use to troubleshoot. I also posted on the 3rd party's site.

Thanks again

I was a shy, quiet kid. I was happiest playing by myself with my toys, rather than hanging around people.
-- Christian Slater

2 Dec 2015, 12:06 AM
#52
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Back again. Thanks to Bubbadood for trying the suggested corrections. I felt the module should work as is, so went in the direction of attempting to install Numinix Product Fields on my online website. Having installed and uninstalled so many times, it was fairly simple. The long path problem arose and I solved that by using the file directly on C:// to shorten the path, and was able to upload the "prebuilt" fields, and all fields show in the list under Catalog, Numinix Product Fields, in the Zen Cart Admin.

Although I was able to install "continental shipping" and "date added" from the menu, I am still unable to install such modules as "dimensions" and "UPC." Here are the error messages:

The Admin error shown in pink at the top of admin states:

Error The selected field was unable to be installed due
to insufficient server permissions, please contact your host.

This same error occurred when I experimentally tried to add the "Dimensions" field as well.

In the Zen Cart "logs" file, it states:

[25-Nov-2015 15:26:35 UTC] PHP Warning: mysqli_connect():
(28000/1045): Access denied for user 'myusername'@'myipaddress' (using
password: YES) in
/var/www/virtual/m/u/storename.com/www/includes/classes/db/mysql/query_factory.php
on line 62
[25-Nov-2015 15:26:35 UTC] PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED
:: SHOW TABLES LIKE 'project_version' ==> (as called by)
/var/www/virtual/m/u/storename.com/www/myadminname/includes/init_includes/init_database.php
on line 28 <== in
/var/www/virtual/m/u/storename.com/www/includes/classes/db/mysql/query_factory.php
on line 155

Taking the message seriously to contact my ISP host, I'm not sure what question to pose to my ISP tech support. Should I ask him to lengthen the path? Is he able to change permissions on individual folders if I am not allowed to do so? Is there an Apache setting that must be changed?

I do not feel I can ask him to troubleshoot the error without giving him a clue on what needs to be done, specifically. I did pose this question to the Numinix support, and if they answer, I will post what they recommend. However, it could be days before they respond, I suspect.

I did make a complete backup before installing the NPF module, but it seems to be installed correctly and just lack some sort of permissions.

Since this error occurs both on my WAMP server at home, and on my online store, I believe that shows it is not specific to the WAMP server. But, could it be related to the fact that the prebuilt fields all have a "YOUR-ADMIN" in each which I did not rename? I believe I was told that was buried, along with each field's install.sql, as those were no longer needed to be used with this NPF module.

Thanks for any help. This installation is on a Zen Cart 1.5.4, and is the most recent NPF plugin in the plugins section.

Notageek

2 Dec 2015, 3:23 AM
#53
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Sorry, wrong log file above. I copied my last log file thinking it would apply to the NPF permissions error, but it was not from 11/30 which is the date of the installation. There are absolutely no errors in the debug logs for 11/30. I should have taken note of that 11/25 date in the file I quoted above.

When one downloads the logs, it takes on the date of the download for all of the debug files. So the only clue to the UPC failure to become an active field goes back to the permissions error for which I need to ask my ISP support person to help, but I feel sure he will not know what type of permission the message is asking him to provide.

Notageek

4 Dec 2015, 3:37 PM
#54
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

On the "insufficient permissions problems, I should clarify that I did look on the file folders of the prebuilt fields and their admin permissions online were "read, write, execute." I found a website listing a number of different types of permissions, so there are too many types to know this without some guidance. It is previously stated in this thread that it is not correct to rename the "YOUR_ADMIN" in the prebuilt fields files and then use the install.sql, but this is one option that Numinix in a support ticket did mention, so I am uncertain how to implement that. I am going to try to create a field through this module and see how that goes.

6 Dec 2015, 4:01 AM
#55
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

An update on the "insufficient permissions" issue. There still is no information from Numinix or my ISP on how to approach this error. Therefore, I went ahead and simply copied the UPC field, which field includes ISBN and EAN fields as well. Previously when I tried that I believe I used the wrong Install.sql. This time I used the one in the UPC prebuilt field, and it correctly inserted the requested fields.

I also made a field experimentally, and it has appeared in the products table of my phpmyadmin.

**My question is: Should I be creating an install.sql for self-made fields using the Numinix Product Fields capability to make my own fields? I have a number of additional fields I need to add. I will also be hand-installing the dimensions field which is not installing automatically due to the "insufficient permissions" error.
**
I just want to say that this is an awesome plugin, as I have made fields for Easypopulate by hand in the past, and this is working well for adding the extra fields, even though I have not yet tried to make an install.sql file to insert into the phymyadmin. My new field is working without the install.sql I have not yet made, and it shows up in the product admin and in the phpmyadmin products table.

So thanks to Numinix and Bislewl for the tremendous work on this plugin. It is really incredible. I looked at the Tools, Developers' toolkit for the Description 2 and it is astounding how complex that field is in terms of appearing all over the coding for the Zen Cart.

Notageek

6 Dec 2015, 9:06 PM
#56
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Hi. I'll be trying to figure this out, but in case someone knows this: I want to show "First Published" as the language for "Date Added," using the NPF capability to change the date added. I am hoping this will be just one place where this language will show, and am hoping it will be in maybe the tpl_product_info_default.php which is mentioned at post #19 of this thread.

Does someone have knowledge of where to place this language so the customer will know it refers to the date the item was first published? After experimenting, I will post the answer, if I am able to get that far.

Thanks for any help.

7 Dec 2015, 5:19 AM
#57
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Okay, So far a small success from looking at this thread, http://https://www.zen-cart.com/showthread.php?190417-EasyPopulate-4-0-Support-Thread&p=1249892&highlight=field#post1249892, is that the following steps will make the self-added products below the Numinix-defined products be added into EasyPopulate4:

Go to Configuration, EasyPopulate4, and place the fields you defined into the "user defined fields" option in a comma-separated string. The fields then show up in EasyPopulate4, in the order in which you enter the string, without having provided an install.sql file. The names must be the same as entered. The fields can be seen in the phpmyadmin products table.

So, it appears that, as long as the only table you need is the products table from which EasyPopulate draws, it's straightforward to add those fields then to EasyPopulate. This also goes for the fields you added from the prebuilt Numinex fields.

I found that, looking for a spot to place the field so the customer could see it, in includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php, was not so straightforward. I think the instructions were to find a spot and type this into the .php file:

echo: zen_products_lookup((int)$_GET['pID], 'air_mail') where "air_mail" is the field you want to insert for the customer to see. Before doing that, I believe the instructions are to go to the Developer's Toolkit, and lookup "air_mail" and see if it occurs in $products_id, 'air_mail'.

I tried to add "subtitle" and the lookup revealed the following locations:

C:/wamp/www/mystore/includes/templates/tableau/templates/tpl_modules_contact_us_popup.php

Line #5 : <h3><?php echo HEADING_CONTACT_US_POPUP_SUBTITLE; ?></h3>

C:\wamp\www\mystore\mysecretadmin/includes/languages/english/npf_definitions/subtitle.php

Line #13 : define('TEXT_SUBTITLE', 'Subtitle: ');

C:\wamp\www\mystore\mysecretadmin/includes/npf_includes/npf_sql/subtitle.php

Line #13 : $parameters['subtitle'] = '';

Line #14 : $npf_fields .= ', p.subtitle';

C:\wamp\www\mystore\mysecretadmin/includes/npf_includes/npf_sql_array/subtitle.php

Line #13 : if(isset($_POST['subtitle']) && $_POST['subtitle'] != ''){

Line #14 : $sql_data_array['subtitle'] = zen_db_prepare_input($_POST['subtitle']);

C:\wamp\www\mystore\mysecretadmin/includes/npf_includes/npf_templates/subtitle.php

Line #5 : <td class="main"><?php echo TEXT_SUBTITLE; ?></td>

Line #6 : <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('subtitle',($pInfo->subtitle),zen_set_field_length(TABLE_PRODUCTS, 'subtitle')); ?></td>

Could someone explain what this tells me in regard to where I would place the "subtitle" so that it would show up to the customer as well as in the admin section of the cart and in EasyPopulate4?

(Please note that the WAMP server uses a backslash, and the windows part of the strings above uses the forward slash, and that would not occur on a Linux server online, if I am not mistaken, so it's a bit out of whack in my WAMP-derived example.)

Lastly, I did not make an install.sql file, but here are two examples from the Numinix Product Fields install.sql files for adding MSRP and EAN:

MSRP mysql
ALTER TABLE products ADD products_msrp VARCHAR( 150 ) DEFAULT '0' AFTER products_price;

EAN
ALTER TABLE products ADD products_ean varchar(32) NULL default NULL after products_isbn

So, by that install sql one can alter the field lengths, and also identify where the placement of the field would be in the products table in PHPMYADMIN, and I would like to know if such install.sql statements would add anything to the fields I have added, or if perhaps I do not need to do the install.sql because the field is already added, seemingly, without the need for the install.sql.

Thanks for any help with this. These are just cloudy areas that I am still trying to get straight in my mind.

7 Dec 2015, 7:01 AM
#58
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: Numinix Product Fields

Hi
In response to the SQL question, if you already added a field to your database, then trying to run the line
ALTER ...ADD ( your field) would fail, because you already put that field into your database. If you want to change the length of the field added or something else, you could run an UPDATE command, or use phpMyadmin again to change your field.

Remember though, if you already put data into that field, altering it could cause the data to change. In addition, always backup your database before making any changes.

Hope this helps.

L

7 Dec 2015, 8:51 PM
#59
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Thanks, Iruskauff. That makes perfect sense.

Notageek

4 Jan 2016, 4:48 AM
#60
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

Re: Numinix Product Fields

Hi. Still looking for help adding a field to the customer side of Zen Cart, which I successfully added to the admin side/Easy Populate 4 side.

In trying to add a field for "Pages" (number of pages in a book), I used the UPC field as an example, and substituted the word "Pages" every time I saw "UPC."

I copied the UPC file in the Tableau template's two files containing the UPC code, which I located using the Developer's Toolkit, but that did not work. The "pages" field does appear in my phpmyadmin, products table, and is turned on in Easy Populate, User Defined Fields.

The "pages" field does not appear in the catalog, product types, edit layout menu, where other Numinix Product Fields appear and can be turned on and off with a 1 or a 0, and maybe that is the key.

The files I changed with no effect were the following:

C:/wamp/www/mystore/includes/languages/english/extra_definitions/numinix_product_fields.php

Line #18 : define('TEXT_PRODUCTS_UPC', 'UPC: '); (NO EFFECT)

2b. C:/wamp/www/mytore/includes/templates/ tableau_1_6_6 /product_info/extra_main_template_vars/numinix_product_fields.php

Line #17 : if (SHOW_PRODUCT_INFO_UPC == 1 || SHOW_PRODUCT_INFO_ISBN == 1) { $npf_attributes .= ', p.products_upc, p.products_isbn'; $flag_show_product_info_upc = 1; $flag_show_product_info_isbn = 1; } NO EFFECT

Line #43 : $products_upc = $products->fields['products_upc']; NO EFFECT

3b. C:/wamp/www/mystore/includes/templates/ tableau_1_6_6/ templates/tpl_product_info_display.php

Line #101 : <?php echo (($flag_show_product_info_upc == 1 and $products_upc != '') ? '<li>' . TEXT_PRODUCTS_UPC . $products_upc . '</li>' : '') . "\n"; ?> NO EFFECT

There were 9 Numinix Product Fields php files and 4 Easy Populate 4 php files that also contained code for UPC, which I did not alter.

Just registering this as history, I guess; people on the forum say this is simple, but it's actually something for which non-coders would need a definite example. I suppose examples go out of date with version changes.

Notageek