Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

Recommended Posts

This addon can only edit existing product. The reason is simple - linking attributes to undefined product is impossible. The linking uses internal database identifiers of attributes, options and first of all, of a product which you link to. No product means no product ID, so linking is impossible.

The internal mechanism of osC allows you to create product (should read as "create new product ID") only after clicking button "Confirm" (sorry, I don't remember actual name of it in english). After you click this, the new product record with new product ID saved in database and you redirected to product listing.

This is why AJAX AM can't work with newly product - there are no product, before you not save it. Adding attributes to product through this contrib is always editing product. So like a standart osC.

 

Well, I think you don't know how valuable is your work with this Addon and after all those bugs fixed you can forget about old features :D. So I took the freedom of testing the latest version with only one file from the old 2.8.4 version :D.

 

It's about: attributeManagerPlaceHolder.inc.php

 

I took it from the 2.8.4 version and add it to 2.8.9 version and BELIEVE me, it's working for adding new products :D (from version 2.8.5 you disabled this feature :D)

 

I tested it and here is a product added with my minor mod: http://www.didis-shop.com/product_info.php?products_id=124

 

If it's working without problems you can make it v2.9 :D

 

Hope my idea to help.

Edited by bogdansbg
Link to comment
Share on other sites

It's about: attributeManagerPlaceHolder.inc.php

 

I took it from the 2.8.4 version and add it to 2.8.9 version and BELIEVE me, it's working for adding new products :D (from version 2.8.5 you disabled this feature :D)

 

I tested it and here is a product added with my minor mod: http://www.didis-shop.com/product_info.php?products_id=124

 

If it's working without problems you can make it v2.9 :D

 

Hope my idea to help.

First of all, I am only one of many contributors, done a very small part of this contrib. So I didn't monitor the progress of this contrib. Now I take a time to overview your solution by reading comments of version history. Unfortunatelly I have no time to carefully test your solution. But I compare two versions by contributor mytool: 2.8.4 and 2.8.5. The changes you are reverted back to 2.8.9 was made in 2.8.5 and the reason is cerefully described. I quote them:

There was a big problem that sorting and Download options will not work on a not yet saved Product, that i was not aware of. I did make changes that the sorting would also work on a new product, but the download option would not yet. So I disabled the functionality on the new Product page. If you want to add Attributes to a product, the product has to be saved first.

This is to make shure it works until it will work also in the new_product page

So if you are wonder by your solution it is good, but I cant contribute your changes and don't advice you to do that before complete testing of the feature.

I must notice other moment. In 2008 QT Pro addon was not work. But now it is work and work good. Definitely it can't work with your solution. Need testing.

Edited by RusNN
Link to comment
Share on other sites

I read also what was wrong with 2.8.4, but now, at least for me, it's working like this. I didn't change anything but a single file, and I think now after so many bugs fixed it might work fine.

 

Anyway, it's a great contribution from everyone who was involved.

 

Too bad OSC is not so expansive like CS-Cart or Magento.

 

Maybe in a future version OSC will have a installer like Joomla, for all contribs.

 

All the best and if I have some problems I will report them here.

Link to comment
Share on other sites

  • 4 weeks later...

Maybe I am a little too stupid to install.

I uploaded all files and I can see the manager in admin too.

But when I put something into my basket at frontend osc tells me that there is no product in the basket?!

 

Did I forget something?

 

Thank you.

 

Mat

Edited by Spaxs
Link to comment
Share on other sites

Maybe I am a little too stupid to install.

I uploaded all files and I can see the manager in admin too.

But when I put something into my basket at frontend osc tells me that there is no product in the basket?!

 

Did I forget something?

 

Thank you.

 

Mat

Do you have QT Pro installed? Does this irregular things happens before AJAX AM installation? Do you install other contrib in the same time with AJAX AM?

Link to comment
Share on other sites

Can someone please help me with this error posted here?

http://www.oscommerce.com/forums/topic/359532-attribute-manager-error-help/

This is double post:

You should disable QT Pro plugin in attributeManagerConfig.class.php file.

Replace this

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

to this

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

Link to comment
Share on other sites

  • 3 weeks later...

I currently have AJAX-AttributeManager-V2.8.9 installed with Attribute Sort with Attribute Clone 1_8 on my OSC Rc2a. When I go to add an option to a product I get the following error:

 

1054 - Unknown column 'products_options_id' in 'order clause'

 

select products_attributes_id, options_id, attribute_sort from products_attributes where products_id=758 ORDER BY products_options_id asc, options_id asc

 

If I add 'products_options_id' to the products_attributes table everything works okay. However, I don't know why that wasn't there to start off and don't want to to cause problems in the future.

 

Also, I noticed that 'products_options_id' is a column in the table 'products_options' and was wondering if this was pointing to the wrong table? any advice?

 

Thanks

Edited by mkosel
Link to comment
Share on other sites

Hi all,

 

I am not getting anything when I try to edit a product. Do we have to have php5 for this to work?

Version 2.8.7 excellent working on PHP Version 5.2.9. Not tested on latest PHP.

Link to comment
Share on other sites

I currently have AJAX-AttributeManager-V2.8.9 installed with Attribute Sort with Attribute Clone 1_8 on my OSC Rc2a. When I go to add an option to a product I get the following error:

 

 

 

If I add 'products_options_id' to the products_attributes table everything works okay. However, I don't know why that wasn't there to start off and don't want to to cause problems in the future.

 

Also, I noticed that 'products_options_id' is a column in the table 'products_options' and was wondering if this was pointing to the wrong table? any advice?

 

Thanks

Possible incorrect installation of Attribute Sort plugin. You should check your settings for AM_FIELD_OPTION_SORT_ORDER and AM_FIELD_OPTION_VALUE_SORT_ORDER in attributeManager\classes\attributeMnagerConfig.class.php. Thouse settings must be pointed to columns that stores sort order of options and attributes. In my case:

		/**
	 * Sort order tables
	 */
	$this->add('AM_FIELD_OPTION_SORT_ORDER','products_options_sort_order'); // Sort column on Products_options table
	$this->add('AM_FIELD_OPTION_VALUE_SORT_ORDER','products_options_sort_order'); // Sort column on product_attributes table

Link to comment
Share on other sites

Hello Guys ,

 

I am getting error

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/Mydomain/public_html/dev/admin/categories.php on line 492

 

Please note the install doc is not very simple for beginners does any one has simple way to explain on how to install it

 

Example: 2) Open admin/categories.php

 

Find (Around line 243 on a fresh ms2)

 

What is ms2 ? do i need to go to categories.php and then find line 243 and add the line

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

 

 

Please advise

 

Thank you very much

Link to comment
Share on other sites

Version 2.8.7 excellent working on PHP Version 5.2.9. Not tested on latest PHP.

 

Is there a way to use php5 on just the ajax attribute manager? WOuld I put something in a httaces file? Any ideas?

Link to comment
Share on other sites

Hello Guys ,

 

I am getting error

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/Mydomain/public_html/dev/admin/categories.php on line 492

 

Please note the install doc is not very simple for beginners does any one has simple way to explain on how to install it

 

Example: 2) Open admin/categories.php

 

Find (Around line 243 on a fresh ms2)

 

What is ms2 ? do i need to go to categories.php and then find line 243 and add the line

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

 

 

Please advise

 

Thank you very much

Seems like you forgot a semicolond during installation Attribute Manager. Install instruction are simple as possible. But if you have your categories.php modified, you should have to some deduction on where to place the Attribute Manager code, because line numbers may be different in that case.

 

ms2 is a MileStone 2 - version of osCommerce prior to RC2a. You may find your version in catalog\includes\application_top.php file. Search for string PROJECT_VERSION around line 38.

Link to comment
Share on other sites

Is there a way to use php5 on just the ajax attribute manager? WOuld I put something in a httaces file? Any ideas?

Unfortunatelly I can't help you. I'am not planning to upgrade to latest PHP. Definitely not .htaccess should be modified.

 

Please tell, do you see the Attribute Manager plugin in categories.php just under the price and before product description? Did you use it on previous PHP version?

Link to comment
Share on other sites

Unfortunatelly I can't help you. I'am not planning to upgrade to latest PHP. Definitely not .htaccess should be modified.

 

Please tell, do you see the Attribute Manager plugin in categories.php just under the price and before product description? Did you use it on previous PHP version?

 

The only thing I see is when you add a new product I do get the Info that says "Save Product before adding options". But after I add or go to something I have already I get nothing at all. So it is working at one point but not where I need it the most. I never used this before.

 

I have both a versions of php4 and php5 running on our server. I have used my htacces file on the store and put in to use only php4 because a lot of things do not work on the store with php5 but I can only use php5 on PHPlist so in that htacces I have php5 listed on it and it runs fine. It will not run on PHP4. That is why I was asking about the htacces file.

 

Any other ideas?

Link to comment
Share on other sites

PHP4 should be OK.

Well, if the 2.8.9 doesn't run, please try 2.8.7. Since this version I see some shuffling in versions. We need to revert to stable. Installation is the same, so, if you have your current version installation correct (please check once again), you need only to replace the whole folder catalog\admin\attributeManager and check configuration in catalog\admin\attributeManager\attributeManagerConfig.class.php. Try it on both PHP and please tell me exactly your PHP version.

Link to comment
Share on other sites

PHP4 should be OK.

Well, if the 2.8.9 doesn't run, please try 2.8.7. Since this version I see some shuffling in versions. We need to revert to stable. Installation is the same, so, if you have your current version installation correct (please check once again), you need only to replace the whole folder catalog\admin\attributeManager and check configuration in catalog\admin\attributeManager\attributeManagerConfig.class.php. Try it on both PHP and please tell me exactly your PHP version.

 

I am now using 2.8.7 and still have the same things happening. When I enter in a new item I get the info in the correct place between the cost and the description. When I go to edit an item I get nothing.

 

I am using PHP4.4.9 and have php5 enabled.

 

I did not change anything in the config file in attributeManagerConfig.class.php. I am not using QTPro. I am not sure about anything else.

 

I am not sure about the sort function if I should change something or not. I do not know if I set up a sort function or if one came with another addon or if this would stop this from working.

 

Also is there a way to require that when categories.php gets used it uses php5? That was what I was trying to do but do not want the whole store to go back to php5 that has problems when using php5. If you do not know exactly what needs to be done to use php5 after I get your next post I will change my htacces file in the admin area to use php5 and see if Ajax attribution manager works for me. Then I will test the rest of the admin area and see if I get any errors. If I do get errors I may have to make catagories.php change my httaccess file on the fly to use php5 and when I am done have a script that puts it back to use php4.

 

Just an idea on how to get this to work and hopefully anyone else that has this problem can use.

Link to comment
Share on other sites

Unfortunatelly I don't know about how to make a single php-file work on different PHP version. My knowledge and skils in PHP are not very good. It need to carefully debug to understand what's wrong with Attribute Manager. I can such things with my shop or in localhost on DENWER, but that is not my... All that I can say? try to catch the code that does not execute and prevents Attribute Manager from loading. What it is I don't know.

 

Nothing special settngs needed. If you have not or don't know about what plugins you have simple use default settings. If something be wrong we see errors. It is better to see error than seeing nothing. All seems that Attribute Manager doesn't load. By the way! Try to turn on QT Pro plugin. May be we see something like an error. This will be the signal that loading done, but something wrong in other place.

Link to comment
Share on other sites

Unfortunatelly I don't know about how to make a single php-file work on different PHP version. My knowledge and skils in PHP are not very good. It need to carefully debug to understand what's wrong with Attribute Manager. I can such things with my shop or in localhost on DENWER, but that is not my... All that I can say? try to catch the code that does not execute and prevents Attribute Manager from loading. What it is I don't know.

 

Nothing special settngs needed. If you have not or don't know about what plugins you have simple use default settings. If something be wrong we see errors. It is better to see error than seeing nothing. All seems that Attribute Manager doesn't load. By the way! Try to turn on QT Pro plugin. May be we see something like an error. This will be the signal that loading done, but something wrong in other place.

 

I turned on QTPro and no change. Still nothing there. I do not know how to make it give me more errors.

 

I do know all the plugins I added but was not sure if Order editor had a sort routine added or the extra fields I added has it or not. I can try turning all the trues to false in the config file to see if that helps. I will later on change the httaccess file and see if I can get it to work that way and will let you know.

Link to comment
Share on other sites

I turned on QTPro and no change. Still nothing there. I do not know how to make it give me more errors.

 

I do know all the plugins I added but was not sure if Order editor had a sort routine added or the extra fields I added has it or not. I can try turning all the trues to false in the config file to see if that helps. I will later on change the httaccess file and see if I can get it to work that way and will let you know.

 

I changed my htacces file to use php5 but still nothing happens. How can I get this to give me errors?

Link to comment
Share on other sites

This is how you solve it:

In catalog/includes/classes/pad_base.php

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)$this->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:

// BOE: Attribute Sort with Clone Tool

$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)$this->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.options_values_price, pa.Products_attributes_id");

// EOE: Attribute Sort with Clone Tool

 

Hi again,

Been working successfully with this addon now for while, since RusNN helped me fix the small problem I was having with it not showing up.

It's been working great, a really good contribution! Makes it so much quicker and easier to add options to products!

I am having one minor problem/defect however.

When I add multiple options to a product, only the first option added keeps itself in the order I set it to on the Attribute Manager control panel.

For example, say I set 3 options for a product, like so;

 

Color:

Red

Green

Purple

 

Size:

Small

Medium

Large

 

Second color:

No Second Color

Grey

Green

Blue

 

.. And then I update that info to the website. The first option (Color) will stay in exactly the order I want it to. But the other two options will mix up in a random order, like so;

 

Color:

Red

Green

Purple

 

Size:

Medium

Small

Large

 

Second color:

Blue

Grey

No Second Color

Green

 

Does anybody know how this can be controlled? So that they all stay in the order I set them to in the Attribute Manager.

 

 

Hello

thanks for great addon

but i got small problem if someone can fix

i have problem sorting Attribute value alphabetical

here are live xample to my site http://lilu-bielizna.com/maja/product_info.php/amelia-p-458

example

Size = A

B

C

D

but i got

 

Size = D

C

A

B

 

help plz

Mode

Link to comment
Share on other sites

I changed my htacces file to use php5 but still nothing happens. How can I get this to give me errors?

 

 

I am still having troub le not getting anything to show up at all. Anybody have any ideas?

Link to comment
Share on other sites

Hi All,

 

Great contrib. Have used it on many stores with great success, however on this one store the contrib works, but when I go to use the attributes the "old fashioned way" I get this error:

 

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

 

insert into products_attributes values (null, '22', '2', '12', '0', '+')

 

[TEP STOP]

 

 

I know you are thinking why would I want to use the old way when I have the new way, but it is annoying me it is not working now. Anyone know why?

 

Thanks

Link to comment
Share on other sites

Hi All,

 

Great contrib. Have used it on many stores with great success, however on this one store the contrib works, but when I go to use the attributes the "old fashioned way" I get this error:

 

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

 

insert into products_attributes values (null, '22', '2', '12', '0', '+')

 

[TEP STOP]

 

 

I know you are thinking why would I want to use the old way when I have the new way, but it is annoying me it is not working now. Anyone know why?

 

Thanks

 

Look at your tables for products_attributes. You probably have another field most likely called sort. You need to add that to your insert call. It can be as simple as just putting in another set of "" to make it work.

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