Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

Recommended Posts

Hi,

Thought i'd post just to let everyone know what the status of this contribution is. I have decided not to continue with the rewrite as i think it will complicate matters which isn't fair because i dont have the time to support it.

 

I know that it currently seems to have some quirks that i think are session related (ie. different setups). Unfortunatly in my testing i dont seem to be able to replicate them.

 

As soon as i possibly can i will release version 1 which will include a few fixes to problems that people have been having. I will then "open it to the masses" so hopefully other people will continue / extend it.

 

Thanks for any compliments that people have been giving, they are very appreciated.

 

Sam aka Nimmit :thumbsup:

 

 

I have a case where both Option Names and Values need to be sorted. Is this support already and I am over looking something? Or is there an easy way to do this. For now at least having things display'd in the order they were entered would be enough. I have taken a look at the SQL statements and attempted to do this by adding ORDER BY statements, however, this appears to have no effect.

 

By the way great contribution: very professional interface and coding.

 

At the moment there is no sort order system in place. My problem was there were so many sort order contributions it is difficult to choose which one to base it on. Because i just don't have the time to 'properly' support it i thought it would be simpler not to include any.

 

 

 

thanks

Link to comment
Share on other sites

Getting:

 

Warning: main(attributeManager/includes/attributeManagerHeader.inc.php): failed to open stream: No such file or directory in /home/signsnsu/public_html/catalogdemo/admin/categories.php on line 344

 

Fatal error: main(): Failed opening required 'attributeManager/includes/attributeManagerHeader.inc.php' (include_path='.:/usr/local/lib/php') in /home/signsnsu/public_html/catalogdemo/admin/categories.php on line 344

 

Can anyone help?

 

code looks like this:

 

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

<!-- [email protected] - AJAX Attribute Manager -->

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

<!-- [email protected] - AJAX Attribute Manager end -->

</head>

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

Link to comment
Share on other sites

Hi Nimmit,

Having the same issues as Vince O'Connor and melina. Any way to address this issue? I cannot update a product without loosing all the attributes added via AJAX attribute manager. When I don't press update the attributes work just fine.

Thanks,

Andrew

Andrew Yuen

osCommerce, Community Team

Link to comment
Share on other sites

Found the solution: there is a conflict with Product Attributes/Item Editor/Price v. 1 I uninstalled that contribution and the problem was fixed!

 

I tried Product Attributes but uninstalled it, and then I installed the AJAX attribute manager, so if there's a conflict between the 2 I don't know why it's not working :/

Link to comment
Share on other sites

This message is for those of you that have a problem whereby attributes are lost when you update the product. You have a conflicting attribute sorter conribution installed. In my case it was this one:

 

/////////////////////////////////////////////////////////////////////
// BOF: WebMakers.com Added: Update Product Attributes and Sort Order
// Update the changes to the attributes if any changes were made
	  // Update Product Attributes
	  $rows = 0;
	  $options_query = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_sort_order, products_options_name");
	  while ($options = tep_db_fetch_array($options_query)) {
		$values_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " p2p where pov.products_options_values_id = p2p.products_options_values_id and p2p.products_options_id = '" . $options['products_options_id'] . "' and pov.language_id = '" . $languages_id . "' order by pov.products_options_values_name");
		while ($values = tep_db_fetch_array($values_query)) {
		  $rows ++;
// original			  $attributes_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_id . "' and options_id = '" . $options['products_options_id'] . "' and options_values_id = '" . $values['products_options_values_id'] . "'");
		  $attributes_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix, products_options_sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_id . "' and options_id = '" . $options['products_options_id'] . "' and options_values_id = '" . $values['products_options_values_id'] . "'");
		  if (tep_db_num_rows($attributes_query) > 0) {
			$attributes = tep_db_fetch_array($attributes_query);
			if ($HTTP_POST_VARS['option'][$rows]) {
			  if ( ($HTTP_POST_VARS['prefix'][$rows] <> $attributes['price_prefix']) || ($HTTP_POST_VARS['price'][$rows] <> $attributes['options_values_price']) || ($HTTP_POST_VARS['products_options_sort_order'][$rows] <> $attributes['products_options_sort_order']) ) {
				tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_values_price = '" . $HTTP_POST_VARS['price'][$rows] . "', price_prefix = '" . $HTTP_POST_VARS['prefix'][$rows] . "', products_options_sort_order = '" . $HTTP_POST_VARS['products_options_sort_order'][$rows] . "'  where products_attributes_id = '" . $attributes['products_attributes_id'] . "'");
			  }
			} else {
			  tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_attributes_id = '" . $attributes['products_attributes_id'] . "'");
			}
		  } elseif ($HTTP_POST_VARS['option'][$rows]) {
			tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $products_id . "', '" . $options['products_options_id'] . "', '" . $values['products_options_values_id'] . "', '" . $HTTP_POST_VARS['price'][$rows] . "', '" . $HTTP_POST_VARS['prefix'][$rows] . "', '" . $HTTP_POST_VARS['products_options_sort_order'][$rows] . "')");
		  }
		}
	  }
// EOF: WebMakers.com Added: Update Product Attributes and Sort Order
/////////////////////////////////////////////////////////////////////

 

I got the AJAX attribute manager to work by just removing this chunk of code.

 

This happens because your existing code is posting variable values to the products_options that don't exist i.e. the attribute manager dynamically updates the database so you don't need extra code to do it.

 

You should just be able to remove whatever code was previously adding product attributes to your database.

 

Hope this helps B)

 

Cheers

Andy

Babylon-sl.com

Link to comment
Share on other sites

Will this be updated soon. I could really use the version that allows you to sort attributes!

 

Hi

 

I don't know whether this will help, I use attribute manager and found I coudn't get them in the right order.

 

So I made a list up in attribute manager, then made a note of what order they were in, then went to product attributes, found the attributes and renamed them in the order I wanted them.

 

ie: if the first on the list in attribute manager was 123 and I wanted it 456 I renamed 123 as 456, so on for 2nd 3rd, etc.

 

Hope this helps and makes sense.

 

Mike

Link to comment
Share on other sites

Install on fresh copy OSC.

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>osCommerce</title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script language="JavaScript" type="text/JavaScript">
var productsId='100';
var pageAction='new_product';
var sessionId='osCAdminID=d8246a5c09b54654b30aa5c784276bf8';
</script>
<script language="JavaScript" type="text/JavaScript" src="attributeManager/javascript/requester.js"></script>
<script language="JavaScript" type="text/JavaScript" src="attributeManager/javascript/alertBoxes.js"></script>
<script language="JavaScript" type="text/JavaScript" src="attributeManager/javascript/attributeManager.js"></script>

<link rel="stylesheet" type="text/css" href="attributeManager/css/attributeManager.css" />
<script language="JavaScript" type="text/javascript">

function goOnLoad() {
attributeManagerInit();	SetFocus();
}

</script>

 

Line: 21

char: 2

error: Object expected

Code: 0

 

Whats wrong?

 

Thank you.

 

remove the admin/atributeManager/.htaccess

 

that will get you going!

I thought this stuff was gonna be easy!!

BACK IT UP BEFORE YOU JACK IT UP!!!!

Link to comment
Share on other sites

Quick question - if a product's price is set to zero, and the attributes carry the actual price, is there any way to hide or disable the prefix from appearing?

 

I've tried leaving the prefix off and just putting the price on the attribute, and it looks perfect in the drop down box on the site, but when you add one of them to the cart, it turns the price into a NEGATIVE.

 

Sorry if this has been addressed before, I've been reading the forum for hours now and can't seem to locate an answer.

 

~Ruthanna~ :blink:

Link to comment
Share on other sites

All you need to do is change the product display to show the actual price, which is nothing to do with AJAX Attribute Manager. I'm sure there's a contribution somewhere to do it, the code it uses is mentioned on the QTPro thread as QTPro produces its own attribute listings.

Link to comment
Share on other sites

Hi this contribution is working great but I notice if I start a clean osCommerce with NO products or attributes and I use the Attribrute Manager it makes the First Option ID 0, which makes the whole thing not work.

 

I found a small fix but rather find the correct way. Smal fix now is make the first option the regular way in osCommerce and it then works.

Link to comment
Share on other sites

I don't know if somebody is aware of this problem, or maybe I'm just looking the wrong and easy way but, I used to be using the Ajax Attribute Manager on PHP4 and it was workin' like a charm.

 

Recently I've change my server to a PHP5 config, no change at all have been changed on he oscommerce installation (Except maybe a $this put in comment in the config of oscommerce) and well, the Attribute Manager is gone... ?:0( I thought that maybe the folder named with upper case were change to a lowercase format, which is unfortunately not the case.

 

Any idea anyone???

 

Andrew

Link to comment
Share on other sites

Hi,

 

I'm experiencing trouble with Ajax attribute manager

 

i'm using latest osC with register global1.4 and access level admin

 

I've got this message :

 

Warning: main(attributeManager/includes/attributeManagerHeader.inc.php) [function.main]: failed to open stream: Permission denied in [blablabla]

 

Fatal error: main() [function.require]: Failed opening required 'attributeManager/includes/attributeManagerHeader.inc.php' (include_path='.:/usr/share/php') in [blablabla]

 

owner rights are correct any clues about this ?

 

thanks

Link to comment
Share on other sites

Great contrib.....I think :'(

 

Can't get it to work...copied alle the files, altered categories.php and so on....

 

There is nothing new to product pages....it's all "stock"

 

Can someone help me?

 

Somewhere there's a javascript command to SetFocus and that needs to be changed to GoOnload (or the other way around!) Think it's in categories.php? Might be it...

Link to comment
Share on other sites

Hi,

Thought i'd post just to let everyone know what the status of this contribution is. I have decided not to continue with the rewrite as i think it will complicate matters which isn't fair because i dont have the time to support it.

 

I know that it currently seems to have some quirks that i think are session related (ie. different setups). Unfortunatly in my testing i dont seem to be able to replicate them.

 

As soon as i possibly can i will release version 1 which will include a few fixes to problems that people have been having. I will then "open it to the masses" so hopefully other people will continue / extend it.

 

Thanks for any compliments that people have been giving, they are very appreciated.

 

Sam aka Nimmit :thumbsup:

At the moment there is no sort order system in place. My problem was there were so many sort order contributions it is difficult to choose which one to base it on. Because i just don't have the time to 'properly' support it i thought it would be simpler not to include any.

thanks

 

Nimmit... noooooo!!! :'( This is the best contribution ever... Are you really pulling the plug on it?

 

I've been soooo excited about you making a version that sorts as well...

 

Man I hope you continue with this project. it's soooo helpful. :(

Link to comment
Share on other sites

Used to work fine on PHP4. :D

 

But now, got this error with PHP5: :blink:

 

Warning: main() [function.main]: open_basedir restriction in effect. File(/classes/amDB.class.php) is not within the allowed path(s): (/var/www/vhosts/mysite.com/httpdocs:/tmp) in /var/www/vhosts/mysite.com/httpdocs/store/admin/attributeManager/attributeManager.php on line 23

 

Warning: main(classes/amDB.class.php) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/mysite.com/httpdocs/store/admin/attributeManager/attributeManager.php on line 23

 

Fatal error: main() [function.require]: Failed opening required 'classes/amDB.class.php' (include_path='.:') in /var/www/vhosts/mysite.com/httpdocs/store/admin/attributeManager/attributeManager.php on line 23

 

Any idea to make work back this kick a** contribution?!? :-" Thx!!!

Link to comment
Share on other sites

Hi there,

 

I've been attribute manager now for a while and think its great. However I've just stumbled upon an problem when updating the price difference on an attribute.

 

I am going back through items and say, where a particular option is discounted by ?5 say, if i then alter this amount to ?4 it doesn't get saved when i update the product page, it remains as ?5.

 

Any ideas?

 

Thanks

 

Dave

Link to comment
Share on other sites

Hi there,

 

I've been attribute manager now for a while and think its great. However I've just stumbled upon an problem when updating the price difference on an attribute.

 

I am going back through items and say, where a particular option is discounted by ?5 say, if i then alter this amount to ?4 it doesn't get saved when i update the product page, it remains as ?5.

 

Any ideas?

 

Thanks

 

Dave

 

Do you have any other attribute contribution on the product page?

Link to comment
Share on other sites

Hi Sam,

 

thanks for the quick reply. Yes I've been using the attribute sets contrib prior to using this and still have it installed. I'll take that off if you think that might be the cause and give that a try.

 

Thanks again

 

Dave

 

PS, please don't throw in the towel on this contribution, its once of the best looking and most useful I've used! :)

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

My English is not very good.

I have a problem.

 

I have option values like 10"or 20".

If I want to again remove these values from the list, I receive the following error message:

 

Javascript alert "There which at error while retrieving the URL: Internal server error "

 

I think that by the instruction "(tariff) it happens.

 

For assistance I am grateful.

 

 

Many greetings Manuela

 

image1.jpg

 

image2.jpg

Link to comment
Share on other sites

hi,

thanks for that great contri, but i got a little problem.

 

after installing this contri its works fine, but after adding several attributes to a product the attribute value are not updated i i change them... is there a limit for the count of the attributes per product?

 

regards peter

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