Jump to content
Nimmit

AJAX Attribute Manager support

Recommended Posts

Quote

Installed the latest version on my Phoenix test store 1.0.7.10 When I enter it, there is a warning:
Notice: Undefined offset: 222 in /admin/attributeManager/classes/attributeManager.class.php on line 237
Notice: Undefined offset: 229 in /admin/attributeManager/classes/attributeManager.class.php on line 237

I can't see this error in my develop store.

Quote

In the old store I also use the weight and attribute images add-ons. These 2 additions have not been updated for many years and do not correspond to modern PCP versions. Special issue with "Attribute Image" that requires a big change to the products_attributes.php file

Options images is available for Phoenix 1.0.2.x and should still work in the actual version. Maybe I'll have a look and update for the Phoenix 1.0.8.0 release.

I never used or worked with options weight. You should claim to the original developer and in it's support thread.

Quote

File \admin\attributeManager\languages\russian\attributeManager.php
has an unreadable format (encoding does not correspond to UTF-8).

Thanks, it seems this was wrong converted to utf-8. I'll include your file in the next update.

Edited by raiwa

Share this post


Link to post
Share on other sites

Thank you very much for your answer, Rainer!

Weight option is highly desirable in our store. Some product attributes are weighted and change the total weight of the order. Therefore, the weight adjustment option will be a useful option for stores.
Such an example: we for example sell a valves for irrigation systems. This valve has the same structure but different weight.
If we use a product attribute such as diameter, for example 1/2 ", 3/4", 1.0 ", 1 1/4", 1.5 ", 2", the weight of the item is very different.
There are two options: place 6 products on the site, or place 1 product, but with 6 attributes.
11171005.jpg.68a3ecc39038d6ccccec02c2dff0782e.jpg

Picture options are also very convenient to work with. For example, drippers for irrigation have a water flow rate of 0.8, 1.2, 2.0, 4.0 liters per hour. They have the same design and differ in color. They have a very small difference in weight, but when a customer orders 100 or 1000 pieces, the weight option also matters.

4-stif.jpg.676286c21c97be6c5349b50ca0788c36.jpg

I think if we can modify the module using these two options, we will get a fully functional module that will be useful for many stores.

Edited by Fredi

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
Quote

Options images is available for Phoenix 1.0.2.x and should still work in the actual version. Maybe I'll have a look and update for the Phoenix 1.0.8.0 release.

I never used or worked with options weight. You should claim to the original developer and in it's support thread.

This is not related to ajax attributes manager, please post in the apropriate threads.

Edited by raiwa

Share this post


Link to post
Share on other sites

Ok, Rainer.
The error I'm having is related to trying to add attribute images to your module.
If I install your module unchanged, it works great ! 👍


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
41 minutes ago, Fredi said:

The error I'm having is related to trying to add attribute images to your module.

Then you probably didn't install options images and the database columns for it are missing:

- Instructions for Options Images BS plugin (version 1.5 or higher required)

1) If you haven't installed the Options Images BS plugin contrib then you should install that one first: https://apps.oscommerce.com/ijmp8&options-images-bs

2) Open admin/attributeManager/classes/attributeManagerConfig.class.php

 

Edited by raiwa

Share this post


Link to post
Share on other sites

I installed everything. Problem with modifying products_attributes.php file in Options Images BS v1.6.1 by Tsimi module.
This file is very old and does not match the modern modified Admin kernel. This is the only problem.
It needs a lot of changes to add the attribute images.

Everything is much easier with the weight option. There are few changes to your module.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

You do not need products_attributes.php using Ajax attributes manager 😉

Share this post


Link to post
Share on other sites

Installed v3.3.2 on Phoenix 1.0.7.12 and got:

Notice: Constant AM_AJAX_IMAGE already defined in /admin/attributeManager/languages/german/attributeManager.php on line 79

in attribute manager tab.

Found some unused defines and AJAX_IMAGE twice in admin/attributeManager/languages/german/attributeManager.php 

Deleted and works fine :) 
 

Share this post


Link to post
Share on other sites

Thank you Dennis, could you please upload your cleaned file to save me some work.

Please upload the file, code gets sometimes corrupted when copy pasting from the forum.

Share this post


Link to post
Share on other sites

Hi Marcelo,

Please provide the following details:

- your exact shop version
- your exact attributes manager version

Please read this topic (Phoenix club):

or if you have no access to the Phoenix club:

 

Edited by raiwa

Share this post


Link to post
Share on other sites

In 1.0.7.14 the following functions are deprecated in admin:
tep_session_id
tep_session_name
tep_session_register
tep_session_is_registered
tep_session_unregister

It seems to be working with fixes for

admin/attributeManager/includes/attributeManagerHeader.inc.php
admin/attributeManager/includes/attributeManagerSessionFunctions.inc.php

included in the zip.

       

fixes.for.1.0.7.14.zip

Share this post


Link to post
Share on other sites

Uploaded:

Ajax Attribute Manager 3.3.3

Compatibility:
Phoenix 1.0.7.10+
Tested with Phoenix 1.0.7.14
PHP 7.0 to 7.4

+ fixed bad encoding in russian language file. Thanks to @Fredi
+ fixed duplicated and removed unused definitions in language files. Thanks to @Dennis
+ modernized code to match actual core standards.

and

Ajax Attribute Manager 3.3.4

Compatibility:
Phoenix 1.0.7.14+
Tested with Phoenix 1.0.7.14
PHP 7.0 to 7.4

+ updated deprecated session functions for Phoenix 1.0.7.14. Thanks to @vmn

 

Share this post


Link to post
Share on other sites

Hi dear;

I just upgraded I get this error on the product in admin ;

Can you guide me on the mistake I might have made?

Version 1.0.7.14 and 3.3.4

1054 - Unknown column 'sort_order' in 'field list'

UPDATE `products_attributes` SET `sort_order`=`products_options_sort_order`

 

Thank you very much in advance;

Warm Regds./

radhavallabh

Share this post


Link to post
Share on other sites

You missed an upgrade step in your upgrade path to Phoenix 1.0.7.14.

sort_order has been added to core.

Share this post


Link to post
Share on other sites

14 minutes ago, raiwa said:

You missed an upgrade step in your upgrade path to Phoenix 1.0.7.14.

sort_order has been added to core.

Hi I do have the column on my product_options table it was added in 1.0.7.10 upgrade dear.. i did not miss that step... 😟

Screenshot.png

Edited by radhavallabh

Share this post


Link to post
Share on other sites

It’s missing in the products_attributes table, not products_options

Share this post


Link to post
Share on other sites

Hi Rainer,

Hate to bother you but I just upgraded  to 3.3.4 on Phoenix 1.0.7.14 and get the following error  that have not had before when updating a product with options  :

line 201 i s       

 <?= tep_draw_pull_down_menu("new_option_value_$optionId",$attributeManager->buildOptionValueDropDown($optionId),(((!isset($selectedOptionValue)) || (0 == $selectedOptionValue)) ? '0' : $selectedOptionValue),'style="margin:3px 0px 3px 0px;" id="new_option_value_'.$optionId.'"');?>
 

Fatal error: Uncaught TypeError: Argument 1 passed to Text::output() must be of the type string, null given, called in /xx/xx/xx/xx/catalog/admin/includes/functions/general.php on line 58 and defined in /xx/xx/xx/xx/catalog/includes/system/versioned/1.0.7.other/1.0.7.12/text.php:40 Stack trace: #0 /xx/xx/xx/xx/catalog/admin/includes/functions/general.php(58): Text::output(NULL, Array) #1 /xx/xx/xx/xx/catalog/admin/includes/functions/html_output.php(309): tep_output_string(NULL, Array) #2 /xx/xx/xx/xx/catalog/admin/attributeManager/attributeManager.php(201): tep_draw_pull_down_menu('new_option_valu...', Array, '0', 'style="margin:3...') #3 {main} thrown in /xx/xx/xx/xx/catalog/includes/system/versioned/1.0.7.other/1.0.7.12/text.php on line 40
 Save Cancel
 
 
 
 
 
 Save Cancel
 
 
Edited by artfulweb
forgot a line

Share this post


Link to post
Share on other sites

Hi @artfulweb,

I can't reproduce this error. I tried with empty attributes values and other combinations, no luck.

Can you please try the following:

- try in a clean, unmodified Phoenix 1.0.7.14 store installation
- your screenshot shows uncorrect (not bootstrapped) save and cancel buttons
- post your exact sample data for options/attributes

You could try the following fix  to get around this error:

in: admin/attributeManager/classes/attributeManager.class.php line 695 change to:

	function buildOptionValueDropDown($optionId = '', $subtract = true) {

Please report back

regards
Rainer

Share this post


Link to post
Share on other sites
20 minutes ago, raiwa said:

Hi @artfulweb,

I can't reproduce this error. I tried with empty attributes values and other combinations, no luck.

Can you please try the following:

- try in a clean, unmodified Phoenix 1.0.7.14 store installation
- your screenshot shows uncorrect (not bootstrapped) save and cancel buttons
- post your exact sample data for options/attributes

You could try the following fix  to get around this error:

in: admin/attributeManager/classes/attributeManager.class.php line 695 change to:


	function buildOptionValueDropDown($optionId = '', $subtract = true) {

Please report back

regards
Rainer

Sorry Rainer, those are the buttons on the "edit post" of the page! Here is a screen shot rather messy concerning options that already existed, the  "language" option is ok but the "womans size" for some reason will no longer work after having worked all these years

 

fatal_error.jpg

Share this post


Link to post
Share on other sites

Please try the fix I posted and check if you get a similar error if editing this attribute on the core attributes page.

Edited by raiwa

Share this post


Link to post
Share on other sites
5 minutes ago, raiwa said:

Please try the fix I posted and check if you get a similar error if editing this attribute on the core attributes page.

With the fix when editing the option on the core attributes page I get this :

Notice: Undefined index: tmp_name in /xx/xx/xx/xx/admin/includes/classes/upload.php on line 47 Notice: Undefined index: unlink_value_image in /xx/xx/xx/xx/admin/products_attributes.php on line 147 Notice: Undefined index: delete_value_image in /xx/xx/xx/xx/admin/products_attributes.php on line 147 Notice: Undefined index: delete_value_image in /xx/xx/xx/xx/admin/products_attributes.php on line 151 Warning: Cannot modify header information - headers already sent by (output started at /xx/xx/xx/xx/admin/includes/classes/upload.php:47) in /xx/xx/xx/xx/admin/includes/functions/general.php on line 36

Share this post


Link to post
Share on other sites

I'm sorry, but you mixed up 2 different things:

1. The fix is for the attributes manager on the categories/product page.

2. Check in the core attributes page for a similar error to know if it's a problem with your options/attributes data.

It seems you have somehow a corrupted set of data which produces the error. I can't help further on this, it's a specific problem in your store which exists also on the core attributes page.

I would recommend you to delete the attributes which produce the error and create them again.

Share this post


Link to post
Share on other sites
Just now, raiwa said:

I'm sorry, but you mixed up 2 different things:

1. The fix is for the attributes manager on the categories/product page.

2. Check in the core attributes page for a similar error to know if it's a problem with your options/attributes data.

It seems you have somehow a corrupted set of data which produces the error. I can't help further on this, it's a specific problem in your store which exists also on the core attributes page.

I would recommend you to delete the attributes which produce the error and create them again.

Nightmare! it concerns 4000 products... Thanks anyway Rainer. Will try to reload my Phoenix 1.0.7.12 and work upward again.

Share this post


Link to post
Share on other sites
2 minutes ago, artfulweb said:

Nightmare! it concerns 4000 products... Thanks anyway Rainer. Will try to reload my Phoenix 1.0.7.12 and work upward again.

You may analize what's wrong in your data and fix it in your database.

And: Did you check in attributes manager if the error persists with the applied  fix?

Edited by raiwa

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

×