Jump to content
Latest News: (loading..)
Nimmit

AJAX Attribute Manager support

Recommended Posts

Hi, all!

 

I installed AJAX Attribute Manager awhile ago, and up until now it has worked flawlessly. (WONDERFUL add-in, btw!) But, suddenly it's stopped working. I have deleted and re-installed the admin/attributesmanager directory, triple-checked the coding in admin/categories.php and admin/includes/template-top.php and I just can't seem to figure out why it's not working.

 

Attached is my current admin/categories.php and admin/includes/template-top files. Can anyone spot where I've gone wrong? It's probably something really dumb and I'm missing it because I've been staring at this code for hours.

 

Thanks for any help or tips provided!

 

Regards,

 

Chris

categories.php

template_top.php

Edited by Chrison

Share this post


Link to post
Share on other sites

Hi, all!

 

I installed AJAX Attribute Manager awhile ago, and up until now it has worked flawlessly. (WONDERFUL add-in, btw!) But, suddenly it's stopped working....

 

UPDATE:

 

I have found the section of code that's breaking AJAX Attribute Manager, but for the life of me I can't figure out why?!?! :unsure: Here's the code in catalog/admin/includes/template_top that's causing a problem:

 

<!-- AJAX Attribute Manager  -->
<?php
if ((basename($_SERVER["SCRIPT_NAME"]) == FILENAME_CATEGORIES)) {
	require('attributeManager/includes/attributeManagerHeader.inc.php');
}
?>
<!-- AJAX Attribute Manager  end -->

</head>

<?php
 // Discount Code 3.1.1 - start

 if (basename($PHP_SELF) == FILENAME_DISCOUNT_CODES && isset($action) && $action == 'new') {
echo '<body onload="onload();">';
 } else {
echo '<body onload="goOnload();">';
 }
 // Discount Code 3.1.1 - end
?>

 

If I take out the if/else statement for Discount Code and replace it with <body onload="goOnload();"> then AJAX Attribute Manager works fine. (I haven't checked to see if that breaks Discount Code, though.) But, if I leave that code in for Discount Code then AJAX Attribute Manager does not work even though the code is still outputting <body onload="goOnload();"> (I checked the page source)!

 

To my non-programmer eyes the output that's going to the browser is exactly the same so shouldn't AJAX Attribute Manager work with the Discount Code if/else statement in there?!?!?

 

Could someone please give me a hand with this as it's starting to drive me nuts! :(

 

Thanks for any help/suggestions provided!

 

Regards,

 

Chris

Edited by Chrison

Share this post


Link to post
Share on other sites

Hello, I'm using the Minsparx Admin in my store. Can I use the AJAX Manager in it too? Or this may make errors or "blow up" my store?

Share this post


Link to post
Share on other sites

Hi,

 

I had installed this addon, checked three times with my installation steps, and it seems I had follow the steps in the right way.

Somehow I did not have the AJAX Attribute comes up after click on Admin / Catalog / Categories & Products

 

And when I test to save a product, I got error message as below:

 

 

1054 - Unknown column 'products_cost_price' in 'field list'
insert into products (products_quantity, products_model, products_price, products_cost_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added) values ('0', '', '', '', null, '0', '1', '0', '0', now())

 

according to the thread "AJAX Attribute Manager" to v2.3.1?

I have to install QTPro, I did but the errors still the same. (SQL error and AJAX not appear)

 

Can anyone please help? Im newbie just started edit oscommerce a while ago, don't know much about PHP and SQL.

It will be very much appreciated if could point me out which file and what part of code I should look into.

 

Lyn

Share this post


Link to post
Share on other sites

there is no AJAX appear when i add new catalog or new product, but when I modify the products in the sample list, the AJAX show up, however it doesn't works at all. When I save it and open the edit product page, it goes back to the original setting.

 

Can anyone please help this issue?

 

thanks

 

Lyn

Share this post


Link to post
Share on other sites

1. any idea how to allow OPTION titles to be colored?

 

I tried adding css plus a span in the option box, but its does not work

 

.pink {color:#FF00AA;}

<span class="pink">option title</span>

 

all options turn pink, then the title gets kicked out and all that's left is <span class=

 

 

2. last upload was 2.8.7 Jan 27 2010... alot has changed, any suggestions on an upgrade...hate to "fix" what isn't broke, but maybe I'm missing something

Edited by ErikMM

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

Share this post


Link to post
Share on other sites

Found it!...

 

Fix to allow colons ( ' : ' ) in option names and option values:

 

edit attributeManager\classes\attributeManager.class.php

 

look for ( this one is inside function addOption($get) { ...} )

list($langId,$name) = explode(':',$option);

change it to:

list($langId,$name) = explode(':',$option, 2);

 

and

 

look for ( this one is inside function addOptionValue($get) { ...} )

list($langId,$name) = explode(':',$optionValue);

change it to:

list($langId,$name) = explode(':',$optionValue, 2);

 

Done!

 

if you want to be able to add ':' in template names , look for explode(':',$templateName); and change it to explode(':',$templateName,2);

 

I've given this a quick test and looks ok, lemme know if I missed anything ;)

 

enjoy

perhaps this can be used to allow quotation marks " as well? so I can manipulate colors as mentioned in my post above^?...don't know how to add this though

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

Share this post


Link to post
Share on other sites

Hi,

 

well i installed the contrib and see the "Save Product before adding options" message, when i try to add an article.

 

But when i try to edit an already saved article, nothing happens. Atrribute manager is missing. No errors, nothing. PHP error reporting is enabled.

 

However, in my local xampp installation, i see the attribute bar - everything works fine. But i am getting the

 

Deprecated: Assigning the return value of new by reference is deprecated 

 

error message. Well this message doesn't apper on my product server, too.

 

 

Well i tried to fix it and changed line 55 from:

		$attributeManager =& new attributeManagerAtomic(amGetSessionVariable(AM_SESSION_VAR_NAME));

to

		$clone = attributeManagerAtomic(amGetSessionVariable(AM_SESSION_VAR_NAME));
	$attributeManager = clone $clone;

 

I don't know, if that is the correct way! I tried to replace "=& new" with the "clone-function". It seems to work with line 55. But line

		$attributeManager =& new attributeManagerInstant($_GET['products_id']);

 

isn't so simple?!? "$test = attributeManagerInstant($_GET['products_id']);" for example does not work. I am not really a coder. But i think to disable error reporting isn't even a correct way...

 

 

But at the moment my problem is, that the ajax attribute manager section is blank!

 

greetz Crusher

 

Same issue, Anyone got a fix?

Share this post


Link to post
Share on other sites

Hello. I have been searching and searching and cannot find this simple answer. I have installed and reinstalled this great contribution ( currently running with ver 2.8.10) I have various attributes per product and simply want the price to adjust accordingly with each chosen option. It adds the correct price to the cart but does not update the product info page with each choice the customer makes.

 

Example

 

attribute one - flavor

 

increase flavor +.25

original recipe +.00

decrease flavor -.25

 

attribute two - bottle size

 

3 mls +.95

10 mls +.1.37

30 mls + 4.25

 

 

any help would be appreciated.

 

Thanks

Share this post


Link to post
Share on other sites

Hello. I have been searching and searching and cannot find this simple answer. I have installed and reinstalled this great contribution ( currently running with ver 2.8.10) I have various attributes per product and simply want the price to adjust accordingly with each chosen option. It adds the correct price to the cart but does not update the product info page with each choice the customer makes.

 

Example

 

attribute one - flavor

 

increase flavor +.25

original recipe +.00

decrease flavor -.25

 

attribute two - bottle size

 

3 mls +.95

10 mls +.1.37

30 mls + 4.25

 

 

any help would be appreciated.

 

Thanks

 

OK how about this question LOL Does anyones price change on the product info page after an attribute is selected ( meaning a bug) or it is just mine. Please let me know time is flying and I need to get this up and running Thanks

Edited by deemarie

Share this post


Link to post
Share on other sites

Installed AAM 2.8.2. on an almost fresh osC 2.3.3. Getting lots of warnings like:

 

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 143

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 148

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 167

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Someone got an idea?

Share this post


Link to post
Share on other sites

I just installed this contribution onto my Osc 2.3 store however when I assign the net price to the attribute the attribute tax is not calculated correctly.

Tax rate is set at 23% in Locations/Taxes > Tax Rates and the base prices are shown with the correct tax added but the attribute prices are not.

 

Example below

 

Admin Side:

Product Price 388 inc vat

Attribute Price + 48.78 ex vat

 

Product Info Side:

Product Price: 388 inc vat

Attribute Price + 51 inc vat (at 23% vat it should read 60 inc vat)

 

I have spent the last 6 hours searching for any mention of a similar problem to this, but no joy :(

 

Any help would be greatly appreciated

Edited by johnnymacsoldier

Share this post


Link to post
Share on other sites

I just installed this contribution onto my Osc 2.3 store however when I assign the net price to the attribute the attribute tax is not calculated correctly.

Tax rate is set at 23% in Locations/Taxes > Tax Rates and the base prices are shown with the correct tax added but the attribute prices are not.

 

Example below

 

Admin Side:

Product Price 388 inc vat

Attribute Price + 48.78 ex vat

 

Product Info Side:

Product Price: 388 inc vat

Attribute Price + 51 inc vat (at 23% vat it should read 60 inc vat)

 

I have spent the last 6 hours searching for any mention of a similar problem to this, but no joy :(

 

Any help would be greatly appreciated

 

 

Hello again

 

Just an update to the price gets calculated incorrectly only when I add the product to Specials

 

Please any help would be great

Share this post


Link to post
Share on other sites

Installed AAM 2.8.2. on an almost fresh osC 2.3.3. Getting lots of warnings like:

 

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 143

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 148

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 167

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in ......\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Someone got an idea?

 

After my service provider said they are migrating to 5.4 in january (from 5.2) i also got these errors and fixed them with the following

 

in admin/attributeManager/classes/amDB.class.php and in admin/attributeManager/classes/stopDirectAccess.class.php

 

every function needs to have public static placed in front of it eg

 

function authorise($sessionVar) {
 amSessionRegister($sessionVar);
 $GLOBALS[$sessionVar] = stopDirectAccess::makeSessionId();
}

 

becomes

 

public static function authorise($sessionVar) {
 amSessionRegister($sessionVar);
 $GLOBALS[$sessionVar] = stopDirectAccess::makeSessionId();
}

 

and finally in admin/attributeManager/includes/attributeManagerGeneralFunctions.inc.php

 

change

 

$attributeManager =& new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));

 

with

 

$attributeManager = new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));

 

 

and change

 

$attributeManager =& new attributeManagerInstant($_GET['products_id']);

 

with

 

$attributeManager = new attributeManagerInstant($_GET['products_id']);

 

This removed all warnings for me

Share this post


Link to post
Share on other sites

Has Anyone found a solution to this problem as im getting it too

 

Many thanks in advance

 

UPDATE:

 

I have found the section of code that's breaking AJAX Attribute Manager, but for the life of me I can't figure out why?!?! :unsure: Here's the code in catalog/admin/includes/template_top that's causing a problem:

 

<!-- AJAX Attribute Manager -->
<?php
if ((basename($_SERVER["SCRIPT_NAME"]) == FILENAME_CATEGORIES)) {
	require('attributeManager/includes/attributeManagerHeader.inc.php');
}
?>
<!-- AJAX Attribute Manager end -->

</head>

<?php
// Discount Code 3.1.1 - start

if (basename($PHP_SELF) == FILENAME_DISCOUNT_CODES && isset($action) && $action == 'new') {
echo '<body onload="onload();">';
} else {
echo '<body onload="goonload();">';
}
// Discount Code 3.1.1 - end
?>

 

If I take out the if/else statement for Discount Code and replace it with <body onload="goonload();"> then AJAX Attribute Manager works fine. (I haven't checked to see if that breaks Discount Code, though.) But, if I leave that code in for Discount Code then AJAX Attribute Manager does not work even though the code is still outputting <body onload="goonload();"> (I checked the page source)!

 

To my non-programmer eyes the output that's going to the browser is exactly the same so shouldn't AJAX Attribute Manager work with the Discount Code if/else statement in there?!?!?

 

Could someone please give me a hand with this as it's starting to drive me nuts! :(

 

Thanks for any help/suggestions provided!

 

Regards,

 

Chris

Share this post


Link to post
Share on other sites

UPDATE FIXED for OSC 2.3.2

 

here is the fix put "<body onload="goonload();">" just after the </head> as below . it seems to work ok for me without error

 

<!-- AJAX Attribute Manager -->

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

<!-- AJAX Attribute Manager end -->

</head>

<body onload="goonload();">

<?php

// Discount Code 3.1.1 - start

if (basename($PHP_SELF) == FILENAME_DISCOUNT_CODES && isset($action) && $action == 'new') {

echo '<body onload="onload();">';

} else {

echo '<body>';

}

// Discount Code 3.1.1 - end

 

Has Anyone found a solution to this problem as im getting it too

 

Many thanks in advance

Share this post


Link to post
Share on other sites

Has anyone had the issue of not being able to put in the symbol & as in K&N. I have gone through all of the Files for AM but i cannot find the code where it is striping this character out.

Share this post


Link to post
Share on other sites

Hello all, downloaded this addon and uploaded the necessaries. The problem now comes with adding the lines of code to the categories.php page. I've only managed to find one line of code the guide asks for, the rest don't exist? :/

 

Any help or even a copy+paste of a full page of complete coding for this?

 

Cheers,

Richard

Share this post


Link to post
Share on other sites

I also cannot find all of the lines that I'm supposed to add text after them. The lines involved are:

 

341:

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

 

346:

onload="SetFocus();"

 

The line that is supposed to be on 530, is actually on line 557 (if the previous two lines are not found). Anyone know of a solution to the issue?

Share this post


Link to post
Share on other sites

I have installed OSC 2.3.3 and added Ajax AttributeManager V.2.8.10

Technical Details of my localhost test server

MySql 5.5.27

Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7

phpMyAdmin 3.5.2.2

 

I am receiving the following errors in New Product in "Top"

 

I did make the changes as detailed in another post but still receive the errors.

 

So I need help with a solution, please?

 

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 143

 

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 148

 

Strict Standards: Non-static method amDB::query() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 167

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

 

Strict Standards: Non-static method amDB::fetchArray() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\oscommerce\catalog\admin\attributeManager\classes\attributeManagerConfig.class.php on line 168

Share this post


Link to post
Share on other sites

I installed version 2.8.10 on a 2.3.3 cart. I also have QTPro 4.6.1 installed. I'm not seeing any error messages but when I edit a product the AJAX Attibute Manager options do not appear. It looks the same as if Attribute Manager was not installed.

 

For installation I copied the entire attributemanager folder to my admin folder. Then I updated admin/categories.php and admin/includes/templates_top.php as mentioned in the install file for 2.3.1.

 

Is there a step I missed that's keeping it from working?

Share this post


Link to post
Share on other sites

Not sure what the problem was but I loaded my backup files and reinstalled. Now it's working.

 

Does anyone know why when I sort the order of the attributes it changes there but the changes do not carry over to the product info pages in the store?

 

Also, when I add a new attribute, the drop down list under the QTPro section of Attribute Manager doesn't update until I reload the page. Is there a way to fix that?

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

×