Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

Recommended Posts

Thank you Sara! I take a time to improve AJAX AM. It need some compilation from last 3 versions including your corrections.

Hi, how are you doing with this? Is this V2.8.9?

 

I want to install AJAX AM on my 2.2rc2a and need to know if I should wait for some 'ultimate' version coming soon.

 

Thanks.

 

(I am only using English)

Edited by MattReid
Link to comment
Share on other sites

I'm happy to say AJAX Attribute Manager works great on the new OSC v2.3.1 with just a few minor adjustments!

 

Here's what you need to do:

 

Step 1. MAKE A BACKUP!!!!!11!!one1

 

Step 2. Don't talk about figh....oh wait. :D

 

Really though, make a backup...to your local drive...it will save you some day!

 

Step 2. Upload the full attributeManager folder (found under catalogs in the AM download) to your admin folder.

 

Step 3. Using your favorite editor, open up admin/categories.php. If you're using a halfway decent editor (Notepad++ WOOOOO!) you'll want to wander down to about line 244 or so. Here you will see this little fella:

 

tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
       }

 

Modify it like so:

 

tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
       }
/** AJAX Attribute Manager  **/ 
require_once('attributeManager/includes/attributeManagerUpdateAtomic.inc.php'); 
/** AJAX Attribute Manager  end **/

 

Right now you're probably nudging your buddy going, "This smartass is just reading off the directions that come with the package!". Ok then Mr. Smartypants...find me <script language="javascript" src="includes/general.js"></script> in admin/categories.php! HA! You can't, because it's no longer there...no, putting it in there doesn't count. Alright, back to topic.

 

As I mentioned above the next part of the instructions call for adding a snippet of code after <script language="javascript" src="includes/general.js"></script> and...well, as I said, it's no longer there. Don't fret though, it's still around...just in a different file.

 

Step 4. So let's take that handy editor and open up admin/includes/template_top.php. Low and behold, there's our little friend (line 38)!

 

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.js'); ?>"></script>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script type="text/javascript" src="includes/general.js"></script>                 <!---Hello there!

 

So now we continue following instructions and make it look like so:

 

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.js'); ?>"></script>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script type="text/javascript" src="includes/general.js"></script>
<!-- AJAX Attribute Manager  -->
<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' )?>
<!-- AJAX Attribute Manager  end -->

 

Now Harold and his buddies weren't trying to just make your life hell by moving it on ya. To my understanding, they have centralized page headers into a single file, so we no longer have to hunt through 30 different files to do so. Simple. Quick. Easy. Tidy.

 

Now don't go closing admin/includes/template_top.php just yet, we're still going to need it.

 

Step 5. Here they want you snooping around in admin/categories.php again for this little snippet: onload="SetFocus();". Don't waste your time...just like before. It's not there. But where could it be? Go ahead...guess where it is.

 

WRONG (Unless you guessed it doesn't exist AT ALL.) :P

 

That's right...it's nowhere to be found. So stop looking for it already! We're actually going to completely ignore onload="SetFocus();", it's nothing but a tease. Instead let's goto line 44 in our admin/includes/template_top.php we have open still.

 

I know...what a disappointment. Just a lonely <body> tag...all by itself. Did I mention it was lonely?

 

Let's get him some company! Let's take our <body>, dash on a bit of: onload="goOnLoad();" as per our instructions and viola! We end up with this:

 

<body onload="goOnLoad();">

 

Complicated stuff, isn't it? :lol: It's now safe to save and close admin/includes/template_top.php...we're done with it.

 

Step 6. To finish up, we need to get back to admin/categories.php. Scroll waaaaaaaaaay on down to line 553 where you should find this:

 

<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
<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>

 

Now pay attention to the word GROSS there as the modification comes after this specific snipit. Put the code from the instructions directly under it, like so:

 

<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
<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>
<!-- AJAX Attribute Manager  -->
<tr>
<td colspan="2"><?php require_once( 'attributeManager/includes/attributeManagerPlaceHolder.inc.php' )?></td>
</tr>
<!-- AJAX Attribute Manager end -->

 

That it's...we're done! Now go upload your admin/categories.php and admin/includes/template_top.php to your web server and check it out!

 

:o Oh noes!! :angry: It doesn't work! :'( What did you screw up this time? :-"

 

Ha Ha! Gotcha. :devil: (Unless you happen to have QT Pro installed, then it probably worked, but it might not have and if it didn't I can't help you because I'm not using it!)

 

Step 7. If you don't have QT Pro installed you very likely got all excited as it started to work and then ended in a tragic trainwreck of gobbly-gook ending with [TEP STOP]. I died a little inside when I saw it...did you?

 

To fix it, we need to open up admin/attributeManager/classes/attributeManagerConfig.class.php (Say that 5 times fast!). As usual I'll feed ya a line number...maybe I should put them all together and go get a PowerBall ticket? Nah...I actually can't even afford a PowerBall ticket right now. But if you get one with my line numbers and win...please remember me. o:)

 

Ah-hem. Sorry...where were we? Yes...admin/attributeManager/classes/attributeManagerConfig.class.php line number 65 is the one we want.

 

$this->add('AM_USE_QT_PRO', true);

 

Let's change that sucker to false...so it should look like so:

 

$this->add('AM_USE_QT_PRO', false);

 

That's it! Save admin/attributeManager/classes/attributeManagerConfig.class.php, toss it up on the web server and viola!

 

There you have it. AJAX Attribute Manager in OSC v2.3.1.

 

;)

 

Peace,

Chris

Edited by hughesca
Link to comment
Share on other sites

I'm happy to say AJAX Attribute Manager works great on the new OSC v2.3.1 with just a few minor adjustments!

 

What contribution? AJAX-AttributeManager-V2.8.7 (full QT Pro support)?

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

Link to comment
Share on other sites

I just went for it and used the 2.8.8 Jan 27 contrib...looks great, not everything I want it to be, but it beats the hell out of the other stock admin option.

 

I don't understand what the Feb 19 change does?

 

Regardless, THANKS! I am glad I stumbled upon this.

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

Link to comment
Share on other sites

Chris done great work. Congrats!

 

You also make AJAX AM compatible to osC v2.3 and later by doing standart installation except two steps in step 2:

 

1. In admin\categories.php EXCEPT adding

<!-- AJAX Attribute Manager  -->
<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' )?>
<!-- AJAX Attribute Manager  end -->

add

require_once('attributeManager/includes/attributeManagerHeader.inc.php');

AFTER

require(DIR_WS_INCLUDES . 'template_top.php');

or MOVE

require_once('attributeManager/includes/attributeManagerHeader.inc.php');

exactly UNDER

require(DIR_WS_INCLUDES . 'template_top.php');

in case of upgrading from v2.2.

 

2. Completely ignore instruction of modifying BODY tag to

onload="goOnLoad();"

.

 

And the last change:

 

3. In admin\attributeManager\includes\attributeManagerHeader.inc.php REPLACE

function goOnLoad() {
<?php	if('new_product' == $action || 'update_product' == $action) echo 'attributeManagerInit();';	?>
SetFocus();
}

with this

$(document).ready(function(){
 <?php  if('new_product' == $action || 'update_product' == $action) echo 'attributeManagerInit();';  ?>
 SetFocus();
});

 

So, we just make JQuery to work for us. It runs AJAX AM after page were loaded. We changed only 1 core file admin\categories.php as in original instruction.

 

Tested, works OK.

 

 

Hi, Sara!

I'm sorry, but I completely have no time to made this contrib actually multilingual.

 

To all

Hope after New Year I'll find time to make AJAX AM to other version, just because it has some shuffle in versions after 2.8.7 (full QT Pro support) and some bugs are found in them.

Edited by RusNN
Link to comment
Share on other sites

The AJAX Attribute Manager works great for 2.3.1.

 

Now that I have options like size and color, BUT there is no error message for a customer if a customer does not choose an option. For example, I have "Choose, Small, Medium, Large..." If they just hit "buy," and no size, I will get an order saying they ordered "choose" (i.e they made no size-choice). I will then have to contact them to get them to tell me what size they want.

 

It seems QT PRO is similar to AJAX AM, and maybe it can be used in lieu of AJAX AM. Does anyone know the difference, and if QT PRO alone might be enough? And more importantly, does QT have the warning option described above that AJAX AM lacks?

 

I'd rather ask than go through the install process only to find QT PRO its not what I need.

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

Link to comment
Share on other sites

The AJAX Attribute Manager works great for 2.3.1.

 

Now that I have options like size and color, BUT there is no error message for a customer if a customer does not choose an option. For example, I have "Choose, Small, Medium, Large..." If they just hit "buy," and no size, I will get an order saying they ordered "choose" (i.e they made no size-choice). I will then have to contact them to get them to tell me what size they want.

 

It seems QT PRO is similar to AJAX AM, and maybe it can be used in lieu of AJAX AM. Does anyone know the difference, and if QT PRO alone might be enough? And more importantly, does QT have the warning option described above that AJAX AM lacks?

 

I'd rather ask than go through the install process only to find QT PRO its not what I need.

I'am afraid you are completely wrong.

 

If you want your customers should see any error messages you MUST have QT Pro plugin installed.

Ths main difference between QT PRO and AJAX AM is the QT Pro is the system that mainly CONTROL the stock on client side and AJAX AM is the ADMIN SIDE ONLY that allows you EASILY support your products, thier attributes and stock. Both system may be installed separatelly and no one is need the other. But if you want to have more usable interface to control stock on your admin side, you should install AJAX AM at least 2.8.7 version with QT Pro support or later. And if you want you custmers to view messages you should install QT Pro.

 

QT pro has internal tool to control stock on admin side, but it is completely unusable if you have lots of products. AJAX AM allows you to do some more. It replace unusable osC build-in tool for adding products options.

 

So to make your life easy you should have both.

Link to comment
Share on other sites

hello!

It seems that I can't use this contrib. I am using 3 browsers: IE 8, Opera 10 and Mozilla 3.6.2.

The problem is that it does nothing. Nothing is showing below the price.

I tryed to delete the .htaccess file but with no luck. I used a lot of versions of this contributions and none worked.

I've had some errors in the language file (<? converted to <?php and <br /> converted to <br>) but beside this nothing is showing

Only when I try to add a new product I get this message: "Save Product before adding options"

So, there is a solution to this problem?

 

Thank you!

 

I had the same issue and found the solution : My ADMIN directory has been renamed for security purpose, but these scripts are refering to /ADMIN for the admin directory.

I renamed any /ADMIN to /my-personal-admin-directory in all the files (1 click with Dreamweaver) and it works perfectly now.

 

Dont forget to edit the language file (replace <? with <?php) and deactivate QTpro in attributeManagerConfig.class.php if you are not using it.

 

Good luck !

 

Simple but you have to know about it !

Link to comment
Share on other sites

getting this.

 

 

ajax1.png

 

 

some searching gets me - that its wamp and my version of php. I have wampserver 2.0 and php 5.3.0.

 

what do you folks recommend?

 

 

UPDATE: ok. i installed php 5.2.9-2. It got rid of the deprecated errors but not the mosh of code. I thought it would get rid of that.

 

Hmm.. thought I did a good job following the instructions. I did back up, so thats not a problem.

Edited by tonymatt
Link to comment
Share on other sites

Hi there,

 

I have just updated from a version I have been using for a couple of years and love the improvements :)

 

I just wanted to ask about the option sort order. I can change the order of them in the back end,they move up and down nicely but nothing changes on the front end and nothing appears to get written the database.

 

For some reason I have 3 sort order columns in my product_options table which are

 

products_options_values_sort_order

 

AM_FIELD_OPTION_SORT_ORDER

 

and products_options_sort_order

 

but none of them contain anything apart from a 0

 

Have I missed something out? any ideas?

 

Thanks

 

Dave

Edited by stubbsy
Link to comment
Share on other sites

sorry one more question,

 

I just saw that Mortals version 2.8.7 has a lot more useful features, but upon installing it I am unable to create any new Options.

 

With Options Types enable it creates a blank option and with Option Types disabled it doesnt create anything, upon hitting create the window disappears and thats it, no option created, not even a blank one.

 

any ideas?

 

Thanks

 

Dave

Link to comment
Share on other sites

Installed the module as described instructions, everything works, just had to rename the language file the <? On <? php and attributeManager.php change <?=language variable?> to <? php echo (linguistic variable)?> otherwise. htaccess required to include php_flag short_open_tag on

But it was all smooth on the edit page of the goods an error

---

Deprecated: Assigning the return value of new by reference is deprecated in H:\xampp\htdocs\oscommerce\www\admin\attributeManager\includes\attributeManagerGeneralFunctions.inc.php on line 55

 

Deprecated: Assigning the return value of new by reference is deprecated in H:\xampp\htdocs\oscommerce\www\admin\attributeManager\includes\attributeManagerGeneralFunctions.inc.php on line 58

 

Warning: Cannot modify header information - headers already sent by (output started at H:\xampp\htdocs\oscommerce\www\admin\attributeManager\includes\attributeManagerGeneralFunctions.inc.php:55) in H:\xampp\htdocs\oscommerce\www\admin\attributeManager\attributeManager.php on line 72

---

If you turn on php_flag display_errors off in. htaccess then everything seems to works.

Tell me please, it's all wrong, or just me?

Edited by WadimCo
Link to comment
Share on other sites

Chris done great work. Congrats!

 

You also make AJAX AM compatible to osC v2.3 and later by doing standart installation except two steps in step 2:

 

1. In admin\categories.php EXCEPT adding

<!-- AJAX Attribute Manager  -->
<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' )?>
<!-- AJAX Attribute Manager  end -->

add

require_once('attributeManager/includes/attributeManagerHeader.inc.php');

AFTER

require(DIR_WS_INCLUDES . 'template_top.php');

or MOVE

require_once('attributeManager/includes/attributeManagerHeader.inc.php');

exactly UNDER

require(DIR_WS_INCLUDES . 'template_top.php');

in case of upgrading from v2.2.

 

2. Completely ignore instruction of modifying BODY tag to

onload="goOnLoad();"

.

 

And the last change:

 

3. In admin\attributeManager\includes\attributeManagerHeader.inc.php REPLACE

function goOnLoad() {
<?php	if('new_product' == $action || 'update_product' == $action) echo 'attributeManagerInit();';	?>
SetFocus();
}

with this

$(document).ready(function(){
 <?php  if('new_product' == $action || 'update_product' == $action) echo 'attributeManagerInit();';  ?>
 SetFocus();
});

 

So, we just make JQuery to work for us. It runs AJAX AM after page were loaded. We changed only 1 core file admin\categories.php as in original instruction.

 

Tested, works OK.

 

 

Hi, Sara!

I'm sorry, but I completely have no time to made this contrib actually multilingual.

 

To all

Hope after New Year I'll find time to make AJAX AM to other version, just because it has some shuffle in versions after 2.8.7 (full QT Pro support) and some bugs are found in them.

Link to comment
Share on other sites

  • 3 weeks later...

Quantity Box Question:

 

I would like to add sizes in quantity, for example I have 25 mediums, 35 large to each product. In AJAX Attribute Manager there is a quantity feature but I am not certain how this actually works. When I add the quantity, there is nothing specific as to what it is being appled to (the product as a whole?) It is not being applied to a specific attribute. I have found another contibution which may allow me to do what I need, but it is not compatible with AJAX Attributes Manager. Any ideas?

Link to comment
Share on other sites

Quantity Box Question:

 

I would like to add sizes in quantity, for example I have 25 mediums, 35 large to each product. In AJAX Attribute Manager there is a quantity feature but I am not certain how this actually works. When I add the quantity, there is nothing specific as to what it is being appled to (the product as a whole?) It is not being applied to a specific attribute. I have found another contibution which may allow me to do what I need, but it is not compatible with AJAX Attributes Manager. Any ideas?

 

It sounds like you are looking for the QT Pro add on. Check this out.

 

It's compatible with AJAX AM. It takes some work to get it set up, but it's worth it if tracking stock is your goal.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

It sounds like you are looking for the QT Pro add on. Check this out.

 

It's compatible with AJAX AM. It takes some work to get it set up, but it's worth it if tracking stock is your goal.

 

I have that one also. In my .csv I have a general quantity designated as v_products_quantity where I can assign a total quantity.

For the attributes, I have v_attribute_values_price and v_attribute_options_id assigned to the name. It would be great if I can also have v_attribute_options_qty. Any ideas how I might do this? Should I request it under new developments or as a requested update to this contribution? It may take me a month or so to figure out how to do it myself whereas you ajax/php genius breeds may know just what I need to do to make it possible.

Link to comment
Share on other sites

Chris done great work. Congrats!

 

You also make AJAX AM compatible to osC v2.3 and later by doing standart installation except two steps in step 2:

 

1. In admin\categories.php EXCEPT adding

<!-- AJAX Attribute Manager  -->
<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' )?>
<!-- AJAX Attribute Manager  end -->

add

require_once('attributeManager/includes/attributeManagerHeader.inc.php');

AFTER

require(DIR_WS_INCLUDES . 'template_top.php');

or MOVE

require_once('attributeManager/includes/attributeManagerHeader.inc.php');

exactly UNDER

require(DIR_WS_INCLUDES . 'template_top.php');

in case of upgrading from v2.2.

 

2. Completely ignore instruction of modifying BODY tag to

onload="goOnLoad();"

.

 

And the last change:

 

3. In admin\attributeManager\includes\attributeManagerHeader.inc.php REPLACE

function goOnLoad() {
<?php	if('new_product' == $action || 'update_product' == $action) echo 'attributeManagerInit();';	?>
SetFocus();
}

with this

$(document).ready(function(){
 <?php  if('new_product' == $action || 'update_product' == $action) echo 'attributeManagerInit();';  ?>
 SetFocus();
});

 

So, we just make JQuery to work for us. It runs AJAX AM after page were loaded. We changed only 1 core file admin\categories.php as in original instruction.

 

Tested, works OK.

 

 

Hi, Sara!

I'm sorry, but I completely have no time to made this contrib actually multilingual.

 

To all

Hope after New Year I'll find time to make AJAX AM to other version, just because it has some shuffle in versions after 2.8.7 (full QT Pro support) and some bugs are found in them.

 

After Chris and your interaction edit time work fine but at the time of new product show below message.

"Save product options before adding"

Can u help me for that?

Link to comment
Share on other sites

That's right.

As far as I remember there were an old version of AJAX AM which allows to add attributes even if NO product is (product was not saved) in database. This is not correct in my opinion. I dont't carefully see when this feature were disabled, but in my and later version product should be saved (read as it must be present in database) before adding options through AJAX AM.

Link to comment
Share on other sites

I just added AJAX Attribute Manager and I got it working just fine. I need a way to add text entry boxes to my products as well. I have some custom items that a customer can add there own text. I installed Text Attributes Mod v1.3.4, but it conflicted with AJAX AM - made it dissappear. I undid the changes and am back to just AJAX AM. Any ideas what add-on I can use for this?

Repetition is the key to success; Practice, Practice, Practice.

No outside links in signatures allowed.

Link to comment
Share on other sites

I have just upgraded a shop from osC 2.2MS-2 to 2.2RC2a along with Ajax Attribute Manager to V2.8.8

 

All seems to be in place and correct as previously except that now in new products whilst I can correctly create a 'New Option' with a Value, Prefix and Price, for example...

 

Sweat Shirt - Colour: amber, Prefix: none, Price: none

 

When I come to create second and subsequent colour options, say black, ticking the green arrow in the pulldown against the colour simply changes the original amber colour entry to black - no additional colours are added. Clearly the contribution is not working and I suspect the database is a possible cause.

 

Have checked all upgrade entries to v2.8.8 and they seem fine. Any ideas, anyone?

Link to comment
Share on other sites

See my previous post above. Gave up on 2.2RC2 and AM 2.8.8, simply could NOT get second and subsequent issues resolved. Also experiencing issues over other contributions used on 2.2MS2 site.

 

Decided to grab bull by horns and go for complete new osC 2.3.1 install and add latest versions of previous used site contributions. With AM v2.8.9 I looked at install.html and posts #1102 by Chris and #1106 by RusNN.

 

As 2.8.9 install.html refers to "only tested on MS2" and some coding mentioned does not appear in admin/categories.php in osC2.3.1, I am confused as to real changes needed for successful instalation. This is a great contibution and I would like to get it up and running again.

 

Can someone clarify exactly any coding changes to admin/categories.php, etc to get AM2.8.9 working with osC2.3.1? I have trief two routes based on posts #1102 and #1106 with any apparent change of layout within osC Admin, add new product.

Link to comment
Share on other sites

When I try to add a new attribute with the Attribute Manager I get this error:

 

--------

1048 - Column 'price_prefix' cannot be null

 

insert into products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order) values ('29', '1', '15', '1', null, '1')

 

[TEP STOP]

---------

This error comes whatever I use plus or minus.

 

I use the version AJAX-AttributeManager-V2.8.9 with disabled QT Pro.

 

Thank's for your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...