Jump to content

Archived

This topic is now archived and is closed to further replies.

Guldstrand

"AJAX Attribute Manager" to v2.3.1?

Recommended Posts

Has anyone managed to install "AJAX Attribute Manager" on V.2.3.1?

If yes, please post a small guide on how to do this?


I am who I am, unfortunately.

Share this post


Link to post
Share on other sites

Has anyone managed to install "AJAX Attribute Manager" on V.2.3.1?

If yes, please post a small guide on how to do this?

 

I have just installed this on 2.3.1 and with a couple of changes it works perfectly.

 

Follow the install as per normal but when it asks you to insert the following remember this code is now in admin/includes/template_top.php

 

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

 

Below add

<!-- AJAX Attribute Manager -->

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

<!-- AJAX Attribute Manager end -->

 

The <body> tag is also in the same file as above. Just add the new onload as the <body> tag is empty in 2.3.1

 

Find (Around line 346 on a fresh ms2)

onload="SetFocus();"

 

Replace With

onload="goOnLoad();"

 

 

You will also need to change these lines in admin/attributeManager/includes/attributeManagerGeneralFunctions.inc.php

 

		$attributeManager =& new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));
}
else
	$attributeManager =& new attributeManagerInstant($_GET['products_id']);

 

to

 

		$attributeManager = new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));
}
else
	$attributeManager = new attributeManagerInstant($_GET['products_id']);

 

I dont think I have missed anything, go have a go.

 

I installed the version with QTpro so I needed to download and run the sql from that package as well.

 

Regards

 

Mark


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

Thanks for your help, Mark. I will try to arrange this during the evening.

 

No worries, to be honest after I had installed it I found an older thread that said the same thing :lol:


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

I've done all the changes, but i´m getting a sql-error when editing a product:

 

1054 - Unknown column 'products_options.products_options_track_stock' in 'where clause'

select products_name, products_options_name as _option, products_attributes.options_id as _option_id, products_options_values_name as _value, products_attributes.options_values_id as _value_id from products_description, products_attributes, products_options, products_options_values where products_attributes.products_id = products_description.products_id and products_attributes.products_id = '243' and products_attributes.options_id = products_options.products_options_id and products_attributes.options_values_id = products_options_values.products_options_values_id and products_description.language_id = 1 and products_options_values.language_id = 1 and products_options.products_options_track_stock = 1 and products_options.language_id = 1 order by products_attributes.options_id, products_attributes.options_values_id

[TEP STOP]


I am who I am, unfortunately.

Share this post


Link to post
Share on other sites

I dont't find the folowing line in the file admin/includes/template_top.php

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

do I have to add this also in admin/includes/template_top.php?

 

th

Share this post


Link to post
Share on other sites

Hello there,

I am brand new to osCommerce. I have just downloaded the AJAX ATTRIBUTE MANAGER and it is only one file named "attributeManager.css" 3,555 bytes in size! How do you install it?

Thanks,

tpcc

Share this post


Link to post
Share on other sites

Hi! I am trying to get the attribute manager to auto select a language, so I dont have to click a language flag:

 

 

foreach ($languages as $amLanguage) {

?>

<!--Original//-->

 <input type="image" src="<?php echo DIR_WS_CATALOG_LANGUAGES . $amLanguage['directory'] . '/images/' . $amLanguage['image'];?>" title="<?php echo AM_AJAX_CHANGES;?>"

<?php echo ($attributeManager->getSelectedLanguage() == $amLanguage['id']) ?

'style="padding:1px;border:1px solid #ff9900;" onclick="return false;";' : 'onclick="return amSetInterfaceLanguage(\''.$amLanguage['id'].'\')";';?> >

<?php

}

}

 

Any ideas?

 

Sara

Share this post


Link to post
Share on other sites

Talk about lousy instructions!! >_<

 

I've followed the instructions on here to a T and the instructions ( if you can call them that ) with the attribute manager

I'm using Oscommerce 2.3.1

 

and Find (Around line 346 on a fresh ms2)

onload="SetFocus();"

 

Replace With

onload="goOnLoad();"

 

I cannot for the life of me find that line in any of the .php files.

 

Is there anything out there that works and comes with better instruction

Share this post


Link to post
Share on other sites

Good I install oscomerce installing ajax attribute manager but does not work do the steps but does not work again and again repeat the steps but nothing help please

Share this post


Link to post
Share on other sites

Good I install oscomerce installing ajax attribute manager but does not work do the steps but does not work again and again repeat the steps but nothing help please

 

I think it needs further development

 

I've done the whole 5 min process again and now got the error:

 

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values (null, '32', '1', '1', '1', '')

 

[TEP STOP]

 

Thank god I backed everything up!

Share this post


Link to post
Share on other sites

Hi all

I've just installed AJAX Attribute Manager for 2.3 on a nearly fresh Install of Oscommerce 2.3.1, the only addons i have on this is Qtpro and CCVG (all for osc 2.3.1)

 

I also had trouble with the instructions for this module (attribute manager), but i now have it working perfectly, so i thought i would point out the areas i had problems with and how i got it working, i know most people would of got this working but i thought a few might be as confused as i was :-)

 

First thing i noticed that the folder i downloaded, The attribute Manager folder wasnt placed in a Admin folder as it should of been, like it said in the instructions. (this might confuse peeps as i also use the folders as guide to placement)This folder has to be downloaded as complete file in the admin folder, not separated in other folders in admin

 

Step 2 in the instructions, the first bit was fine but the second bit that says "Find (around line 556 on a fresh ms2.3)"

           <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 -->

 

Missed out the section on what to do with the <!-- AJAX Attribute Manager --> bit, i found that you have to place the code below (i dont know if this is correct but it worked for me )

 

Step 3

If you can not find admin/includes/template_top.php, the odds are you are using an older version of oscommerce (OSc 2.2) and this module wont work with it.

 

in this step i found first section easy to do but once i got to the body tag bit, i got totally confused :-)

 

The <body> tag is also in the same file as above. Just add the new onload as the <body> tag is empty in 2.3.1

 

onload="SetFocus();"

 

Replace With

onload="goOnLoad();"

What worked for me was on line 43 you can see <body> (this is the bit they mean by empty)

 

it should look like this

<body onload="goOnLoad();">

i also didnt have onload="SetFocus();" anywhere in my code for this page either.

 

Step 4 i gave up on as i have installed Qtpro and this removes the code i needed to find

 

Find this:

       $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

 

REPLACE with this:

//<!-- AJAX Attribute Manager -->
       $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.products_options_sort_order");
//<!-- AJAX Attribute Manager end -->

as this code only adds (order by pa.products_options_sort_order") i thought i can live with out the sort order on ajax attribute.

 

that was the end of the instructions with the download

 

but i did find this in a earlier post by Pupstar that you also need to change these lines in admin/attributeManager/includes/attributeManagerGeneralFunctions.inc.php

               $attributeManager =& new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));
       }
       else
               $attributeManager =& new attributeManagerInstant($_GET['products_id']);

 

to

               $attributeManager = new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));
       }
       else
               $attributeManager = new attributeManagerInstant($_GET['products_id']);

I hope this helps.

 

P.S im not a programmer just a newbie

Share this post


Link to post
Share on other sites

×