Jump to content
Nimmit

AJAX Attribute Manager support

Recommended Posts

I made a mistake in my previous post. This is corrected below. Your help would be greatly appreciated.

 

I installed the contribution and made the changes to admin/catagories.php

After the installation I visited the catalogue page in Admin, the page was blank.

 

There was one difference in the code in my installation vs. the code on the installation notes.

 

In the install notes it says.

 

Find (around line 530 on a fresh ms2)

 

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>

</tr>

 

I could not find this line but found a very similar line of code around 530 which is below. The difference is highlighted in red.

 

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>

</tr>

 

 

Is this the cause of my problems? What can I do to fix it?

 

Thanks for your help

 

andrew

Share this post


Link to post
Share on other sites
One BUG if you load an Tamplate it don load the price +/-

the loaded optins are empty in price section :-(

 

That isn't a bug, the prices arn't saved in the template.

 

I made a mistake in my previous post. This is corrected below. Your help would be greatly appreciated.

 

I installed the contribution and made the changes to admin/catagories.php

After the installation I visited the catalogue page in Admin, the page was blank.

 

There was one difference in the code in my installation vs. the code on the installation notes.

 

In the install notes it says.

 

Find (around line 530 on a fresh ms2)

 

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>

</tr>

 

I could not find this line but found a very similar line of code around 530 which is below. The difference is highlighted in red.

 

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>

</tr>

Is this the cause of my problems? What can I do to fix it?

 

Thanks for your help

 

andrew

 

Just add ... below it

<!-- osc@kangaroopartners.com - AJAX Attribute Manager  -->
<tr>
<td colspan="2"><?php require_once('attributeManager/includes/attributeManagerPlaceHolder.inc.php')?></td>
</tr>
<!-- osc@kangaroopartners.com - AJAX Attribute Manager end -->


Knowledge is knowing that a tomato is a fruit, wisdom is not putting one in a fruit salad :D

Share this post


Link to post
Share on other sites

I have same error, in version 2.1:

 

Fatal error: Cannot redeclare class amdb in g:\weblocal\www\pointdomilitar\loja\admin\attributeManager\classes\amDB.class.php on line 0

Share this post


Link to post
Share on other sites
I have same error, in version 2.1:

 

Fatal error: Cannot redeclare class amdb in g:\weblocal\www\pointdomilitar\loja\admin\attributeManager\classes\amDB.class.php on line 0

 

I do not know why this functions, but functioned... In attributeManager.php, find:

 

// db wrapper
require_once('classes/amDB.class.php');

// session functions
require_once('includes/attributeManagerSessionFunctions.inc.php');

 

Change to:

 

// db wrapper
if(class_exists("amDB"))
require_once('classes/amDB.class.php');

// session functions
if(function_exists("amSessionUnregister"))
require_once('includes/attributeManagerSessionFunctions.inc.php');

 

Your contribuition is very cool!!

 

Thanks!

 

Adriano

Share this post


Link to post
Share on other sites

Great Contribution!!!

In your next version could you add the ability to display a text field as one of the options?

 

Like the Option_type_feature_v1.71 contribution.

This contribution specifically adds the ability to display options with text input boxes. This allows a store owner to collect customization/personalization information for a product from the end user. The contribution is written in such a way that the addition of other option types such as Radio Buttons should be reasonably simple to add.

 

Thanks

Share this post


Link to post
Share on other sites
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

 

That bit of code is just your body tag? If that is the code currently on your site then you haven't followed the install i instructions for this contrib properly

 

From install...

What i was saying is. if mo pics required you to add somthing to the onload function e.g. onload="moPicsFunction();" you would need to add that function call to the go on load funciton instead. I think you have just missed one of the steps of the install. Just replace the SetFocus() with goOnload() and see what happens

Hi Nimmit

 

Sorry been out of circulation

 

Just to wrap up this item - there is no conflict with More_pics_6 v1.2 For osC 2.2 MS2

 

You were quite right I had not installed correctly

 

Two great contributions

 

Thank you Nimmit

 

Regards

 

Nossum

Share this post


Link to post
Share on other sites

i just installed this contrib and it just isnt showing up on the product page!?! I followed the install correctly and verified it again and again. I just dont know what to do. I am not getting any error codes or anything. Please... If you have any ideas, Hook me up.

 

Thanks for any help!

Me

Share this post


Link to post
Share on other sites

Hi nimmit,

 

I had installed the 1.5beta a month ago.. and it worked perfect for me, realy easy to install. But since you made some updates, i wanted to try them out. First i installed it local on my testserver.. Most of it works (not everything tho) but what i need works. BUT when i uploaded all the changes to my webserver, it somehow went wrong. I dont know how its posible but with the EXACT same files, i am not able to view the AJAX Attribute Manager online yet i can on my local server... (using all the same.. same server(apache) same php(4) same browser (ff) etc....)

 

Do you have any idea what or how this comes?

 

I have tried to just put the old (the v 1,5beta) back up.. but the same happens here.. works on localserver, but nothing on webserver...

 

Not even an ERROR.. he doesnt show anything at all....

 

When i look at the source online i have:

							 
<table border="0">
<!-- osc@kangaroopartners.com - AJAX Attribute Manager  -->
<tr>
<td colspan="2"><div id="attributeManager">

</div></td>
</tr>
<!-- osc@kangaroopartners.com - AJAX Attribute Manager end -->
</table>

 

Not on my local server.. there its fine... EVERY FILE IS THE SAME :s

 

I'm so confused and frustrated here... where do i need to search? what could be wrong???

Could it be something at the server? or does it have to be a file??

 

Kind Regards,

Tom


Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Share this post


Link to post
Share on other sites

The issue was solved.. apparantly i coppied a hidden invalid .htaccess in that folder to my server making it not work...

 

Another Question tho?..

 

Is there a way to 'sort' the options??


Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Share this post


Link to post
Share on other sites

Hi all,

I've been playing with this contribution for a while and can get the v1.5 beta contribution working.

 

Unfortunately once I upgrade to the latest version v2.1 I get the following messages.

 

 

Warning: main(): Unable to access classes/amDB.class.php in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 23

Warning: main(classes/amDB.class.php): failed to open stream: No such file or directory in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 23

Fatal error: main(): Failed opening required 'classes/amDB.class.php' (include_path='') in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 23

 

I tried the following fix:

// db wrapper
if(class_exists("amDB"))
require_once('classes/amDB.class.php');

// session functions
if(function_exists("amSessionUnregister"))
require_once('includes/attributeManagerSessionFunctions.inc.php');

 

And got the resulting errors:

Warning: main(): Unable to access classes/attributeManagerConfig.class.php in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 31

Warning: main(classes/attributeManagerConfig.class.php): failed to open stream: No such file or directory in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 31

Fatal error: main(): Failed opening required 'classes/attributeManagerConfig.class.php' (include_path='') in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 31

 

 

So I went and put in a if(class_exists) or if(function_exists) for the remaining require_once calls.

 

And ended up with

Fatal error: Undefined class name 'stopdirectaccess' in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 55

 

At which point I just thought I would write this post! :lol:

 

I am using:

osCommerce 2.2-MS2 with PHP Version 4.3.11

 

Hope this info can help with this problem!

 

Cheers,

Damo

Edited by damonik

Share this post


Link to post
Share on other sites

I Had the same problem with the function redeclared, and i think it s WYSWYG 14fev06 fck editor 2.21 that bring the problem

and this worked to me :

 

I do not know why this functions, but functioned... In attributeManager.php, find:

 

CODE

// db wrapper

require_once('classes/amDB.class.php');

 

// session functions

require_once('includes/attributeManagerSessionFunctions.inc.php');

 

 

Change to:

 

CODE

// db wrapper

if(class_exists("amDB"))

require_once('classes/amDB.class.php');

 

// session functions

if(function_exists("amSessionUnregister"))

require_once('includes/attributeManagerSessionFunctions.inc.php');


MS2

Share this post


Link to post
Share on other sites
i just installed this contrib and it just isnt showing up on the product page!?! I followed the install correctly and verified it again and again. I just dont know what to do. I am not getting any error codes or anything. Please... If you have any ideas, Hook me up.

 

Thanks for any help!

Me

 

 

I too have the same problem...Checked it 3 times and don't see any thing wrong in install...I am not getting any errors, just no AJAX, looks like it did before I started. If I move its location??? would this work? I'm wondering if something on the page aroud products_gross is just not letting it run. I'll try that and let you know...Meanwhile, if anyone comes up with any reason why it may be acting up, let me know.

Teresa

Share this post


Link to post
Share on other sites
The issue was solved.. apparantly i coppied a hidden invalid .htaccess in that folder to my server making it not work...

 

Another Question tho?..

 

Is there a way to 'sort' the options??

 

Thanks so much Darkling...I checked my attribute_manager folder in admin and lo and behold I too had an .htaccess file in there...don't know how it got there, but I deleted it and everything showed up. I can't wait to start playing with it.

 

And to the Author of this nifty little contribution...Thanks a million. I have tried several attribute contributions and they always get all tangled up with QTPRO with which I am not so happy with right now (another story). This was a wonderfully easy contribution to load and is so convenient - and, I might add, Nice Looking!!! Thanks for all your hard work.

Teresa

Share this post


Link to post
Share on other sites
I Had the same problem with the function redeclared, and i think it s WYSWYG 14fev06 fck editor 2.21 that bring the problem

and this worked to me :

 

That is the first step I tried but gives me the error:

Warning: main(): Unable to access classes/attributeManagerConfig.class.php in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 31

Warning: main(classes/attributeManagerConfig.class.php): failed to open stream: No such file or directory in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 31

Fatal error: main(): Failed opening required 'classes/attributeManagerConfig.class.php' (include_path='') in /home/**.net.au/htdocs/catalog/backend/attributeManager/attributeManager.php on line 31

 

Very annoying because the beta works and looks great!! Anyone have any other ideas?

 

Cheers,

Damo

Share this post


Link to post
Share on other sites

This is a very handy contribution! The problem I am having is that when I try to delete a attribute option, I get the pop-up message "Are you sure you want to remove Base Fabric and all the values below it from this product?" - I click yes, but the item isn't removed. Any ideas what might be happening?

Share this post


Link to post
Share on other sites

A while back, I installed the first version and then promptly installed 1.4. When I did, all of the images were missing and the dreaded red x appeared in their places. I had no idea why and I just thought I had somehow made an error.

 

Now on a new site, I have installed the latest version (5.1) and again, the red x appeared but a few images did appear. When I looked in the images folder, I now see that some images are png files. I guess my server is not equipped to open these types of images...is that possible?

 

Aside from that, I love this contribution and it makes my life so much easier - even if I have to look at red x's!

Share this post


Link to post
Share on other sites
This is a very handy contribution! The problem I am having is that when I try to delete a attribute option, I get the pop-up message "Are you sure you want to remove Base Fabric and all the values below it from this product?" - I click yes, but the item isn't removed. Any ideas what might be happening?

 

This is a browser problem. I use Firefox 1.0.6 on Mac 10.3.9. I also tested this in IE 5.2 on Mac. With Firefox the delete button does not delete. On IE the attributes don't show up at all in the Admin products page. I also tested this contribution for the same product in IE on XP and everything worked great - so I know it is installed correctly.

 

Are there plans to support Mac browsers?

Share this post


Link to post
Share on other sites
A while back, I installed the first version and then promptly installed 1.4. When I did, all of the images were missing and the dreaded red x appeared in their places. I had no idea why and I just thought I had somehow made an error.

 

Now on a new site, I have installed the latest version (5.1) and again, the red x appeared but a few images did appear. When I looked in the images folder, I now see that some images are png files. I guess my server is not equipped to open these types of images...is that possible?

 

Aside from that, I love this contribution and it makes my life so much easier - even if I have to look at red x's!

 

 

Oops, I meant v. 2.1....

Share this post


Link to post
Share on other sites
It is a admin session problem, the more info i can get the better.

Is anyone else having this problem ?

 

I too am having the "Session not registered - You cant access this page directly" problem, but I know the source. I have register_globals turned off and AJAX uses globals in its session functions. So, the trick is to figure out a workaround.

 

Has anybody modified AJAX to work with register_globals turned off?

Share this post


Link to post
Share on other sites

Just a suggestion, but in future versions of AJAX you should try to use OSC's session handling or at the very least avoid using GLOBALS, since the next version of OSC will no longer use globals due to the huge security risk of having register_globals on.

Share this post


Link to post
Share on other sites

getting the Fatal error: Cannot redeclare class amdb in /web/jdmcarbo/public_html/admin/attributeManager/classes/amDB.class.php on line 18

 

i installed it n a diff cart and it worked, and i only have like 3 adons installed ont hsi and they shouldnt conflict with this at all.


Check out my fully customized oscommerce site by viewing my profile.

Share this post


Link to post
Share on other sites

Just to let everyone know,

 

I am currently doing a complete re-write of this contribution. It is not ready yet but the previous version will become (in my eyes) obsolete. It includes drag and drop sort order, more refinded interface, better graphics and animated effects. I have (silently) taken into account everyones suggestions and comments all the current issues will be / have been addressed.

 

On the down side (for some), it will be using the prototype.js library wich will conflict with the most popular wysiwyg contribution. The benifits of using this and other librarys in the new version way out ways the down points. There are other wysiwyg editors such as tinymce which are 10x better anyway.

 

I am extreemly busy at the moment with other things (such as relocating to the other side of the world) but as soon as everything has settled down at this end i will release a final version of the current system, then release the new one when i finish it.

 

Some comments and quick fixes for some questions people have been asking...

 

Just a suggestion, but in future versions of AJAX you should try to use OSC's session handling or at the very least avoid using GLOBALS

 

It does, and if you look at the code you will see that?

 

Already defined messages fix

 

Only some setup are effected by this problem and it is becaue of the way the include paths are setup.

 

In attributeManager/attributeManager.php - add the full include path to the includes comming out of the attribute manager direcory.

 

e.g. change

// db wrapper
require_once('classes/amDB.class.php');

// session functions
require_once('includes/attributeManagerSessionFunctions.inc.php');

// config
require_once('classes/attributeManagerConfig.class.php');

// misc functions
require_once('includes/attributeManagerGeneralFunctions.inc.php');

// parent class
require_once('classes/attributeManager.class.php');

// instant class
require_once('classes/attributeManagerInstant.class.php');

// atomic class
require_once('classes/attributeManagerAtomic.class.php');

// security class
require_once('classes/stopDirectAccess.class.php');

 

to...

// db wrapper
require_once('attributeManager/classes/amDB.class.php');

// session functions
require_once('attributeManager/includes/attributeManagerSessionFunctions.inc.php');

// config
require_once('attributeManager/classes/attributeManagerConfig.class.php');

// misc functions
require_once('attributeManager/includes/attributeManagerGeneralFunctions.inc.php');

// parent class
require_once('attributeManager/classes/attributeManager.class.php');

// instant class
require_once('attributeManager/classes/attributeManagerInstant.class.php');

// atomic class
require_once('attributeManager/classes/attributeManagerAtomic.class.php');

// security class
require_once('attributeManager/classes/stopDirectAccess.class.php');

 

 

Im not quite sure what is going on the the session not registered problem i will have to spend a bit more time trying to replicate it. A quick fix for anyone using .htpasswd to secure there admin directory is just to comment out this line in attributeManager/attributeManager.php

 

change...

stopDirectAccess::checkAuthorisation(AM_SESSION_VALID_INCLUDE);


to ...

//stopDirectAccess::checkAuthorisation(AM_SESSION_VALID_INCLUDE);

 

Anyone using an admin password contribution shouldn't use the above fix as it will open up a security hole and you could find your selfs waking up with no attributes in your db!

 

Hope this helps a bit,

 

Sam

Edited by wheeloftime

Knowledge is knowing that a tomato is a fruit, wisdom is not putting one in a fruit salad :D

Share this post


Link to post
Share on other sites
I am currently doing a complete re-write of this contribution. It is not ready yet but the previous version will become (in my eyes) obsolete. It includes drag and drop sort order, more refinded interface, better graphics and animated effects. I have (silently) taken into account everyones suggestions and comments all the current issues will be / have been addressed.

Sam,

This is an excellent contribution, and I appreciate all your work. Moreover, I'm looking forward to your revision.

Some open source people feel entitle to the hard work of others, but I am extremely grateful for the thousands of people like you who participate in the osCommerce community.

How can we contribute financially to help support your efforts?


Sam M. - Seattle

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

×