Jump to content
Nimmit

AJAX Attribute Manager support

Recommended Posts

:(

 

Getting:

 

Warning: require_once(attributeManager/includes/attributeManagerHeader.inc.php) [function.require-once]: failed to open stream: No such file or directory in C:\AppServ\www\Site\admin\categories.php on line 347

 

Fatal error: require_once() [function.require]: Failed opening required 'attributeManager/includes/attributeManagerHeader.inc.php' (include_path='.;C:\php5\pear') in C:\AppServ\www\Site\admin\categories.php on line 347

 

 

Can anyone help?

 

code looks like this:

 

<script language="javascript" src="includes/general.js"></script>

<!-- osc@kangaroopartners.com - AJAX Attribute Manager -->

<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' )?>

<!-- osc@kangaroopartners.com - AJAX Attribute Manager end -->

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="goOnLoad();">

Edited by crucuk

Share this post


Link to post
Share on other sites

Hi All,

 

I'm new to OSCommerce here and have only recently picked up on it as a client as requested that we use OSCommerce for an online shop I'm building for them. Unfortunately it is true that the default attributes module is really painful to use and i've been looking for ways to ease the user experience on that.

 

I believe my search has now ended as I chance upon this excellent contribution. However my client would also need the modifications built into QTPro. I've read the posts and am currently trying to fix up the code for the QTPro integration to work, but it appears that Martin Saunders has already succeeded at that?

 

Martin,

I'm sure that many others as well as myself would really appreciate it if you would post your QTPro code changes for reference. Till then I'll keep plugging away at this and post here if i find a way as well. Once I'm done with this project I'll also be posting up some of my own modifications as contributions.

Share this post


Link to post
Share on other sites

Hello.

 

I encounter a problem with this perfect contribution. I cannot insert any non latin characters. My database is ISO-8859-7, and my database connection collation and database fields are set to Greek too. After many tests and alterations at AJAX request formatting, it seems that I can't insert any non Latin text.

 

It seems that the problem has to do with the javascript's escape function used at attributeManager.js that encodes strings in Unicode format for the url.

Any help will be really appreciated

Share this post


Link to post
Share on other sites

An update on the problem: I removed the javascript's "escape" function from url formatting at attributeManager.js and I noticed that, although ISO-8859-7 is declared both as header at every script at the server (php scripts) and as header for the AJAX communication, FF3 encodes greek as unicode! ie6,ie7 and ff2 behave just fine. So it must be a new firefox's bug...

Share this post


Link to post
Share on other sites

Hi, Sorry, I don't speak english very well. I have two problems with the Ajax Attribute Manager's contribution. In Add/modify product I have this problem:

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/36/d242189767/htdocs/cosmicro/admin/includes/languages/espanol/attributeManager.php:100) in /homepages/36/d242189767/htdocs/cosmicro/admin/attributeManager/attributeManager.php on line 71

 

Then, When I update the product, I have this problem:

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/36/d242189767/htdocs/cosmicro/admin/attributeManager/languages/espanol/attributeManager.php:100) in /homepages/36/d242189767/htdocs/cosmicro/admin/includes/functions/general.php on line 20

 

In the AttributeManager.php I have this:

 

// output a response header

header('Content-type: text/html; charset=ISO-8859-1'); //line 71

//header('Content-type: text/html; charset='.CHARSET);

 

And in the file general.php I have this:

 

function tep_redirect($url) {

global $logger;

 

header('Location: ' . $url); //line 20

 

if (STORE_PAGE_PARSE_TIME == 'true') {

if (!is_object($logger)) $logger = new logger;

$logger->timer_stop();

}

 

exit;

 

 

I have installed Ajax Attribute Manager and the contribution Separate Price For Customers. Something Helpme please? Thanks

Share this post


Link to post
Share on other sites

This happened a while back, and I forgot how I fixed it. Attribute Manager works fine, but if you preview/update a product it deletes all the attributes.

 

Do you know the cause/fix for this?

 

v 2.8.5

PHP 5.2.4, register_globals off

MySQL 5

 

Thanks,

EricK

Share this post


Link to post
Share on other sites

I have a very important question.

 

I just installed the AJAX attribute manager.. ITS GREAT>. i LOVE IT!! however i have a little question that i HOPE HOPE HOPE someone can answer.

I have the super download store installed, and it GROUPS files, and i noticed that when i click EDIT on the digital file attribute, it only shows ONE file.. Is there a way that this works with TWO files in one file group??

 

THANKS!


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
Hi, Sorry, I don't speak english very well. I have two problems with the Ajax Attribute Manager's contribution. In Add/modify product I have this problem:

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/36/d242189767/htdocs/cosmicro/admin/includes/languages/espanol/attributeManager.php:100) in /homepages/36/d242189767/htdocs/cosmicro/admin/attributeManager/attributeManager.php on line 71

 

Then, When I update the product, I have this problem:

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/36/d242189767/htdocs/cosmicro/admin/attributeManager/languages/espanol/attributeManager.php:100) in /homepages/36/d242189767/htdocs/cosmicro/admin/includes/functions/general.php on line 20

 

In the AttributeManager.php I have this:

 

// output a response header

header('Content-type: text/html; charset=ISO-8859-1'); //line 71

//header('Content-type: text/html; charset='.CHARSET);

 

And in the file general.php I have this:

 

function tep_redirect($url) {

global $logger;

 

header('Location: ' . $url); //line 20

 

if (STORE_PAGE_PARSE_TIME == 'true') {

if (!is_object($logger)) $logger = new logger;

$logger->timer_stop();

}

 

exit;

 

 

I have installed Ajax Attribute Manager and the contribution Separate Price For Customers. Something Helpme please? Thanks

Dont know if you fixed this or not, but HEADERS ALREADY SENT usually means you have blank spaces BEFORE the opening php tag or AFTER the closing php tag.


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites

Hello.

 

First I'd like to join others in saying: whoa - this is an amazing contribution :)

 

I've got this problem. I am saving polish characters and getting stuff like this:

test %u0105%u0119%u015B%u0107%u017A%u017Có%u0142%u0144

instead of proper attribute names, etc.

 

Some time ago Nimmit wrote:

 

"...If you are parsing non latin charicters from javascript to the server you will also need to add setRequestHeader("Content-Type", "text/html; charset=ISO-8859-1"); to the request object..."

 

And I don't know how to just do that. Can anyone help?

 

 

P.S. My idea for a quick fix would be a function:

function polishChars($str) {

$str = str_replace("%u0142", "ł", $str);

}

But I am clueless as to where to apply it.


"There is something enduringly seductive in random, explosive acts of no consequence"

Share this post


Link to post
Share on other sites

Addon to the last post:

 

I found the file javascript/requesters.js and there the code I was looking for:

 

var e=(document.charset||document.characterSet||'ISO-8859-8-i');

this.commInterface.setRequestHeader("Content-Type", "text/html; charset="+e);

this.commInterface.setRequestHeader('Accept-Charset',e)

 

As I understand it, this contribution schould already be 'polish chars' friendly.

I tried hardtyping 'utf-8' in there but the problem remains - all polish input gets

saved as %uXXX combinations. Does anyone have an idea how to correct this?

Any help would be greatly appreciated.


"There is something enduringly seductive in random, explosive acts of no consequence"

Share this post


Link to post
Share on other sites

try working with this in attribute manager.php file

- copied this from an old post on this thread

This was in the old version:

// not strictly nessessary but output a header

header("Content-type: text/plain");

 

This is in new code to show norwegian ���, this you can also put inside ajax advansed search Contributions

// output a response header

header('Content-type: text/html; charset=ISO-8859-1');

 

Put this inside to fix the ��� problem, in attributeManager.php , quickfind.php or quickbox :

 

// output a response header

header('Content-type: text/html; charset=ISO-8859-1');

 

hjeres some more info

Installed the latest version of this today and get this message when I edit an Item:
'Session not registered - You cant access this page directly'
I saw this referenced earlier in this thread, but with no solution.

Cheers


Are you still having this problem? 

Let me know. It shouldn't be happening, unless you are trying to directly access attributeManager.php - Please make sure you have followed every install step correctly.


QUOTE (SmartProdukter.no @ Mar 9 2006, 09:26 PM) 
in attributeManager.php i find where to fix the * Fixed non-latin charicters showing ��� 
This was in the old version:
// not strictly nessessary but output a header
header("Content-type: text/plain");

This is in new code to show norwegian ���, this you can also put inside ajax advansed search Contributions
// output a response header
header('Content-type: text/html; charset=ISO-8859-1');

Put this inside to fix the ��� problem, in attributeManager.php , quickfind.php or quickbox : 

// output a response header
header('Content-type: text/html; charset=ISO-8859-1');


Thats right, you have to force the charset to utf-8. If you are parsing non latin charicters from javascript to the server you will also need to add setRequestHeader("Content-Type", "text/html; charset=ISO-8859-1"); to the request object.

 

there is some discussion of it in the March 2006 posts.


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites

Thank you Lindsay. I had looked through this entire thread before posting and also had seen what you pasted above. Unfortunately this does not solve the problem for me. No matter what charset (utf-8 or iso-8859-2) I use (and I am modifying both attributeManager.php and requester.js) I always end up seeing these ugly "%uXXX"'s.


"There is something enduringly seductive in random, explosive acts of no consequence"

Share this post


Link to post
Share on other sites

i'm sorry.. it was the only way i could help since i do not know much about that..


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites

Hi there, also to you lindsay,

 

I just installed this contrib, but can't make it work. I get the following error...

 

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /catalog/admin/includes/functions/sessions.php on line 123

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /catalog/admin/includes/functions/sessions.php on line 123

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /catalog/admin/includes/functions/sessions.php on line 123

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /catalog/admin/includes/functions/sessions.php on line 123

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /catalog/admin/includes/functions/sessions.php on line 123

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /catalog/admin/includes/functions/sessions.php on line 123

Warning: Cannot modify header information - headers already sent by (output started at /catalog/admin/includes/functions/sessions.php:123) in /catalog/admin/attributeManager/attributeManager.php on line 72

 

Anyone who has made this contrib work, please help. I've followed every step as provided but still no success.

Thanks in advance!

Share this post


Link to post
Share on other sites

Did you open the code for attributemanager.php at any time and try to change it??

 

you have an empty space before or after the closing php tags in that file. Open it and delete those and see where that puts you


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
Did you open the code for attributemanager.php at any time and try to change it??

 

you have an empty space before or after the closing php tags in that file. Open it and delete those and see where that puts you

 

Thanks I made it work, also combining other suggestions in this thread by modifying sessions.php.

Way to go with my osc site, still having problems with other contribs, especially with this one..

 

http://www.oscommerce.com/community/contributions,4728

It just refreshes the page.

Share this post


Link to post
Share on other sites

Just upgrading from 2.7.1 to 2.8.5 and found that most option values are empty in the product-editor (for existing option-values for this product) while they exist in the database and also display correctly in the catalog side. Much to my surprise this problem also seem to exist on 2.7.1!? Anyone some thoughts, hints or tips about this before i dive in?

 

BTW: I'll try to add support for TEXT / TEXTAREA as well while i'm add it... (although it will not be included in this contribution offcourse)

 

Thanks in advance,

Paul

Share this post


Link to post
Share on other sites

Thanks to the contrib authors firstly.

 

Installing Attribute Manager after QT Pro resulted in a script error 'Can't move focus to the control because it is invisible, not enabled, or .....', so I tried installing without QT Pro present and it works fine.

 

I see mention of a QT Pro plugin in install.htm but nothing further. Do these two contribs co-exist? Any tips and tricks for getting the two together?

 

Colin.

Share this post


Link to post
Share on other sites
OK, well, I have actually come up the same thing once, but found that there *maybe* a bug for some instances, as it seems that others are working fine without this issue.

 

To correct this, just do the following:

 

1. Open the "catalog\admin\attributeManager\classes\attributeManagerConfig.class.php"

2. Look for:

 

/**

* Install templates if not already done so

*/

$this->installTemplates();

 

3. Remove it!

 

4. Look for:

/**

* Install the sort order tables if they dont already exist

*/

$this->installSortOrder();

 

5. Remove it!!

 

6. Look for:

$this->add('AM_SESSION_SORT_ORDER_INSTALL_CHECKED','am_sort_order_checked');

$this->add('AM_SESSION_TEMPLATES_INSTALL_CHECKED','am_templates_checked');

$this->add('AM_ACTION_GET_VARIABLE', 'amAction'); // attribute manager get variable name

$this->add('AM_PAGE_ACTION_NAME','pageAction'); // attribute manager parent page action e.g. new_product

 

7. ADD AFTER:

/**

* Install templates if not already done so

*/

$this->installTemplates();

/**

* Install the sort order tables if they dont already exist

*/

$this->installSortOrder();

 

8. Should be done!

 

The main issue here is that the attribute manager is trying to initialize the templates and sort order without getting the parameters fully loaded. The above changes will ensure that the parameters are added to the instance before the initialization happens.

 

Hope this help.

 

BTW: Attribute Manager is GREAT!

 

 

 

Thanks so much!

Share this post


Link to post
Share on other sites

Found the problem of the first part; in some way......... products were related to 'values' that were not related to the 'option', this is displayed to the customer correct, but not in the admin side (which is correct), i've made some fixes using phpmyadmin.

 

 

Just upgrading from 2.7.1 to 2.8.5 and found that most option values are empty in the product-editor (for existing option-values for this product) while they exist in the database and also display correctly in the catalog side. Much to my surprise this problem also seem to exist on 2.7.1!? Anyone some thoughts, hints or tips about this before i dive in?

 

BTW: I'll try to add support for TEXT / TEXTAREA as well while i'm add it... (although it will not be included in this contribution offcourse)

 

Thanks in advance,

Paul

Share this post


Link to post
Share on other sites
Hi, I have recently uploaded AJAX-AttributeManager-V2.8.2, but when i try to add or edit any product i get the following error:

-------------------

Warning: array_key_exists(): The first argument should be either a string or an integer in /home/content/k/o/p/kopals/html/admin/includes/functions/sessions.php on line 123

 

 

Warning: array_key_exists(): The first argument should be either a string or an integer in /home/content/k/o/p/kopals/html/admin/includes/functions/sessions.php on line 123

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/o/p/kopals/html/admin/includes/functions/sessions.php:123) in /home/content/k/o/p/kopals/html/admin/attributeManager/attributeManager.php on line 70

--------------------

 

Can anyone help PLEASE, I am so excited to see this wonderful contribution that i must use it as i have lot of products having attributes.. Love and regards: Sanjeev

 

I also am experiencing this problem. Has anyone been able to help?


Rachel M.

Share this post


Link to post
Share on other sites

This contribrutions is really great!!!!

Are you planning to do a Version with open type as well????

This would be bombastic!!!!

What a stupid question I just saw how to adapt it at the bottom of your instructions!!! Sorry!

Yours DWFee

Edited by DWFee

Share this post


Link to post
Share on other sites

Hello,

 

this is a realy great contribution!

 

I have a problem with installation:

 

I install this contribution but I get this error:

 

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ..../admin/includes/functions/sessions.php on line 123

 

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ..../admin/includes/functions/sessions.php on line 123

 

Warning: Cannot modify header information - headers already sent by (output started at ...../admin/includes/functions/sessions.php:123) in ..../admin/attributeManager/attributeManager.php on line 70

 

 

I am runing last Oscommerce version (RC2)

 

Thanks for any help,

 

Bojan

 

 

 

* I saw that user monthyrach has the same problem. Please, help us!

Edited by microslobay

Share this post


Link to post
Share on other sites

I'm getting the same error as microslobay and monthyrach. Mine looks like this:

 

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ...admin/includes/functions/sessions.php on line 123

 

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ...admin/includes/functions/sessions.php on line 123

 

Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ...admin/includes/functions/sessions.php on line 123

Session not registered - You cant access this page directly

 

I see the error on the page where I'm trying to edit a product. Any advice would be totally appreciated! :)

Great contribution! I can't wait to use it :)

Share this post


Link to post
Share on other sites

Oh man... I pulled a newbie mistake.. i didn't read the whole thread. Anyone who is having the problem that I mentioned above, celestum already mentioned a solution. I tried it and it works!!!

 

Thanks to all of you amazing people that spend creating these things and fixing them for us. This contribution rocks!!!

 

OK, well, I have actually come up the same thing once, but found that there *maybe* a bug for some instances, as it seems that others are working fine without this issue.

 

To correct this, just do the following:

 

1. Open the "catalog\admin\attributeManager\classes\attributeManagerConfig.class.php"

2. Look for:

 

/**

* Install templates if not already done so

*/

$this->installTemplates();

 

3. Remove it!

 

4. Look for:

/**

* Install the sort order tables if they dont already exist

*/

$this->installSortOrder();

 

5. Remove it!!

 

6. Look for:

$this->add('AM_SESSION_SORT_ORDER_INSTALL_CHECKED','am_sort_order_checked');

$this->add('AM_SESSION_TEMPLATES_INSTALL_CHECKED','am_templates_checked');

$this->add('AM_ACTION_GET_VARIABLE', 'amAction'); // attribute manager get variable name

$this->add('AM_PAGE_ACTION_NAME','pageAction'); // attribute manager parent page action e.g. new_product

 

7. ADD AFTER:

/**

* Install templates if not already done so

*/

$this->installTemplates();

/**

* Install the sort order tables if they dont already exist

*/

$this->installSortOrder();

 

8. Should be done!

 

The main issue here is that the attribute manager is trying to initialize the templates and sort order without getting the parameters fully loaded. The above changes will ensure that the parameters are added to the instance before the initialization happens.

 

Hope this help.

 

BTW: Attribute Manager is GREAT!

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

×