Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

Recommended Posts

@John W,

 I do not get this error and never saw it.

This var (constant) is defined in the atrtributeManagerConfig.class.php line 109:

		$this->add('AM_SESSION_VAR_NAME','am_session_var'); // main var for atomic

When I apply your suggested fix I get this error:

Parse error: syntax error, unexpected '' (T_STRING), expecting ',' or ')' in C:\xampp_php_7_2\htdocs\2341-Frozen-QTPro\admin\attributeManager\includes\attributeManagerUpdateAtomic.inc.php on line 27

EDIT: Checked again and now it works flawless. Must have copied uncomplete or whatever. The fix looks good.

I'll await if you find more issues and the update.

best regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Link to comment
Share on other sites

Using 2.9.4, options that have prices attached are not permantly changing when a new price is entered, but revert back to previous price.  If I change the price, it changes for a second then goes back to price before. 

I'm not really a dog.

Link to comment
Share on other sites

There is an undefined var warning if a product doesn't have options, so here's another isset fix. I try to get everything running clear with E_ALL.

In file attributeManager2.9.4\attributeManager.php on line 484 find

			<td align="right" colspan="<?php echo (sizeof($options)+2); ?>">

changed to

      <td align="right" colspan="<?php if (isset($options)) { echo (sizeof($options)+2);} ?>">

 

I'm not really a dog.

Link to comment
Share on other sites

On 12/7/2018 at 4:36 PM, John W said:

Using 2.9.4, options that have prices attached are not permantly changing when a new price is entered, but revert back to previous price.  If I change the price, it changes for a second then goes back to price before. 

 

On 12/7/2018 at 5:08 PM, John W said:

Using 2.9.3 the price change works for me, so it's something changed in 2.9.4.  Seems to be one of the class files. 

@John W,

I had a look on this and it seems to me it's not an Attribute manager version issue. It's an issue with PHP 7.2.

I checked all versions from 2.9 to 2.9.4 on PHP 7.1 and the price change works correct with all of them.

Then I checked the same under PHP 7.2 and the price change doesn't work with none of the attribute manager versions.

Can you confirm this, please. I'll have a deeper look to search a fix.

Link to comment
Share on other sites

I should have mentioned, I'm using 7.0 right now on my test site where this problem showed up.  2.9.3 is working fine on my test site running 7.0.  

I'm a little behind on getting some updgrades done.  My live site is using 5.6, so I'm preparing to move it to 7.0, then onward.  December is a good month for me to work on this. I've been a little burned out on this for a while.  Have some mods in my Admin I've been putting off dealing with, thus sticking with 5.6.

I'm not really a dog.

Link to comment
Share on other sites

Now it  is getting interesting:

Checked on PHP 7.0 and the price update doesn't work with none of the am versions from 2.9 to 2.9.4.

PHP 7.1 all versions are working, PHP 7.2 none is working.

Can you please check your am config file if you have the same add-on support settings used in both versions and post them. I have all support switched off.

Link to comment
Share on other sites

I am using an older version of 7.0 on my test site, so I'll upgrade that and see if it changes.  I doubt that's it, but maybe another setting I have.  I have Apache, php, and mysql all separately installed.  The AM_USE_TEMPLATES was set to true, but I have changed it to false and it still works.  The only  setting to true is

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

But, I tried changing it to false and prices still update correctly.

All the settings were the same on 2.9.4.  I figured it had something to do with "Product Attribute Code".

Let me see if have time to update my php version of 7.0

I'm not really a dog.

Link to comment
Share on other sites

It's a cache issue.

Under PHP 7.2:

1. installed new fresh Frozen CE

2. Added AM 2.9.3 => works

3. Updated to AM 2.9.4 => doesn't work

4. Downgraded to AM 2.9.3 => doesn't work

5. Deleted session and browser cache => 2.9.3 works again

6. Updated to 2.9.4 and deleted cache and session => doesn't work

=> now I can recreate your scenario and try to find the error

Link to comment
Share on other sites

I think you're on to it.  I went to 7.1.25 and it didn't work on either.  Went back down to 7.0.33 and neither worked again.  Restarted my browser and 2.93 works now.  My head was starting to hurt.

Unfortunately, I have to go cut the grass.  Fortunately, it's 77 degrees outside, so that's not too bad. 

I'm not really a dog.

Link to comment
Share on other sites

@John W,

I finally went through all changes step by step and could localize the error.

In javascript/attributeManager.js within the amUpdate function I had accidentally removed these lines when removing the attributes code support:

	amSendRequest('amAction=update&option_id='+optionId+'&option_value_id='+optionValueId+'&price='+getDropDownValue('price_'+optionValueId)+'&prefix='+getDropDownValue('prefix_'+optionValueId)+'&sortOrder='+getDropDownValue('sortOrder_'+optionValueId)+'&image='+getDropDownValue('image_'+optionValueId)+'&weight='+getDropDownValue('weight_'+optionValueId)+'&weight_prefix='+getDropDownValue('weight_prefix_'+optionValueId)+'&code_suffix='+getDropDownValue('code_suffix_'+optionValueId)+'&suffix_sort_order='+getDropDownValue('suffix_sort_order_'+optionValueId),'',false);
	getElement('price_'+optionValueId).blur();
    if ((weight != null) && (weight_prefix != null)) getElement('weight_'+optionValueId).blur();
    var el = getElement('sortOrder_'+optionValueId);
	if(el != null) el.blur();
	return false;

I found some other minor glitches.

Tested with: PHP 7.0, 7.1 and 7.2, QTPro support and sort order support.

Here the new package version 2.9.5. Please replace all files.

Please try and let me know.

Thanks for all your help and support.

AJAX-AttributeManager-V2.9.5 BS.zip

Edited by raiwa
Link to comment
Share on other sites

Update uploaded with the above fixes:

AJAX Attribute Manager BS 2.9.5

+ Fixed accidentally removed code which broke the price update. Thanks to @John W
+ Fixed some other minor glitches and code cleanup.

Link to comment
Share on other sites

  • 2 weeks later...

Hello Rainer,

Sorry to bother you. Working on FROZEN BS3 with php 7.2 and AJAX-AttributeManager-V2.9.5 BS I just noticed that trying to add the attribute image on the categories page there is no way to upload it as there is on the products attribute page. On the categories page when clicking on the add image icon I get the following which does not have any upload available, so what do you think could be done ?

Thank you.

Barbie

 

Screenshot (31).png

Link to comment
Share on other sites

Hello @artfulweb,

Sorry, image upload via Attribute Manager is not supported.

Please see Instructions:

NOTE:
- Options images are displayed both, Products Options Images and Options Value Images
- Only Products Options Images can be added, edited or deleted in Ajax Attribute Manager
- No image file uploads, images need to be uploaded apart (via ftp or the core attributes page) and image filenames need to be introduced like for download files.

Images must be uploaded to the directory: images/options/

 

Kind regards

Rainer

 

Link to comment
Share on other sites

  • 8 months later...

Uploaded update for Phoenix:

AJAX Attribute Manager BS 3.0.0.

  • Updated for Phoenix 1.0.x.x compatibility
  • Added code reference for Phoenix
  • Fixed some undefined notice errors.
Link to comment
Share on other sites

  • 2 weeks later...

GET https://www.ultraflex4x4.com/ecommerce/{REMOVED ADMIN FOLDER}/attributeManager/attributeManager.php?products_id=101&pageAction=new_product 500
Requester.loadURL @ requester.js:65
amSendRequest @ attributeManager.js:formatted:72
amRefresh @ attributeManager.js:formatted:85
attributeManagerInit @ attributeManager.js:formatted:10
goOnLoad @ categories.php?cPath=44&pID=101&action=new_product:formatted:29
onload @ categories.php?cPath=44&pID=101&action=new_product:formatted:36
requester.js:91 [Violation] 'readystatechange' handler took 1474ms

 

 

Snapshot_602.png

Edited by burt
Link to comment
Share on other sites

Hello @Garret Krampe,

Need help?  See this thread and provide the information requested.

Please explain what happens and which is your problem so we do not need to analyse the error messages you posted.

However, having a fast look, I guess that you are trying to use AJAX Attribute Manager on a new created product. This doesn't work. Beeing AJAX, it needs the product to be saved first.

Once the product has been saved, open it again and AJAX Attributes Manager will show and work.

Or better, do what 99.9999999% of all shopowners are doing: copy an existing product instead to create a new one, then it will show up and work immediately.

Edited by raiwa
Link to comment
Share on other sites

it just throws up error 500 

I had to remove the package .. tried a few versions even started on fresh php code

2.8 and 2.9.5

nup .. it's broken under https

Don't get me wrong it was lovely when it was working but 

I can't debug java script

just as soon as you edit a product it crashes.

and the errors are the same despite recoding fresh php and putting new attrib directory contents.

 

Link to comment
Share on other sites

Did you read this:

Need help?  See this thread and provide the information requested.

Your store version?, your PHP version ?

Looks like you have problems loading jQuery or with the jQuery version.

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