Jump to content
Nimmit

AJAX Attribute Manager support

Recommended Posts

I have a problem with atrributes manager. When I use a characters like śćłą they are send to database as urlstring with % and numbers. I thing the problem are requests sended as GET strings in url wich are encoded with html special character.

I want to know is there a way to fix this problem without rewriting all functions. I tryed to use html_entity_decode for strings used in querys but witout success. :angry:

Pleas help :'(

Share this post


Link to post
Share on other sites

Hi,

 

I have install AJAX-AttributeManager-V2.8.9 and everything looks fine. The only problem that I have is the "move option". In back-office I can move the options but in front-office the positions of the options maintain the same. It's suppose to change it like I have leave in the back-office.

 

Someone can help me with this problem?

 

Regards,

Share this post


Link to post
Share on other sites

I did not just enter what you suggested, but your post caused me to match the database fields ... which helped greatly

Share this post


Link to post
Share on other sites

---edit-----------

.. I found it !!

Edited by shpy

Paint for VietNamese :

Share this post


Link to post
Share on other sites

Hi

 

I have just installed this and really like it. Thanks so much

It is working fine but I have the below error appearing and don't know how to correct it.

Can anyone help please

Thanks :blush:

 

 

 

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 = '86' 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]

Share this post


Link to post
Share on other sites

Hi

 

I have just installed this and really like it. Thanks so much

It is working fine but I have the below error appearing and don't know how to correct it.

Can anyone help please

Thanks :blush:

 

 

 

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 = '86' 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]

This is part of QT Pro contrib. If you have no QT Pro installed, do this instructions.

Share this post


Link to post
Share on other sites

Hi,

 

I have install AJAX-AttributeManager-V2.8.9 and everything looks fine. The only problem that I have is the "move option". In back-office I can move the options but in front-office the positions of the options maintain the same. It's suppose to change it like I have leave in the back-office.

 

Someone can help me with this problem?

 

Regards,

See page 48 in this topic. You found all answers there. Read from post 947 to 958.

In two words, you should install that contrib.

Share this post


Link to post
Share on other sites

I wish I could get this to work for me.

Hello! Is there good news?

Share this post


Link to post
Share on other sites

Hello I have this problem: I installed the latest version of this wonderfull contribution, but when I input new option in edit product (I use bulgarian language), instead right symbols (пример) I get some sort of wrong letters (example %u0442%u0435%u0441%u0442 ). My encoding is set in includes/functions/database.php to set CP1251 to mysql when input bulgarian letters in DB to record them right. When I insert new option in products_attributes.php in admin, I don`t have such a problem. Can someone help with direction what I`m missing to work properly or where to fix the code.

Share this post


Link to post
Share on other sites

Hello I have this problem: I installed the latest version of this wonderfull contribution, but when I input new option in edit product (I use bulgarian language), instead right symbols (пример) I get some sort of wrong letters (example %u0442%u0435%u0441%u0442 ). My encoding is set in includes/functions/database.php to set CP1251 to mysql when input bulgarian letters in DB to record them right. When I insert new option in products_attributes.php in admin, I don`t have such a problem. Can someone help with direction what I`m missing to work properly or where to fix the code.

The issue is in not using iconv() on creating options and attributes in AJAX AM. Please remember me after 2 days. I can't check my files just now.

Share this post


Link to post
Share on other sites

The issue is in not using iconv() on creating options and attributes in AJAX AM. Please remember me after 2 days. I can't check my files just now.

 

Can you check it yet?

Share this post


Link to post
Share on other sites

Can you check it yet?

Yes, I found a solution. Not carefully test it, but in my native russian seems work fine.

 

The problem was in javascript function escape() which works incorrect with cirillic and as a result return improper UTF-8 string. We must replace escape() with encodeURIComponent() and do some more.

 

1. FIND in catalog\admin\attributeManager\javascript\attributeManager.js around line 339

			returnArray.push(allValues[i].id+':'+escape((getElement(allValues[i].id).value)));

and REPLACE it with

			returnArray.push(allValues[i].id+':'+encodeURIComponent((getElement(allValues[i].id).value)));

 

2. ADD to catalog\admin\attributeManager\includes\attributeManagerGeneralFunctions.inc.php BEFORE last ?>

// convert charset from UTF-8 to e-shop defaults
function amIconv($string) {
 return iconv('UTF-8', CHARSET . '//TRANSLIT', $string);
}

 

3. FIND in catalog\admin\attributeManager\classes\attributeManager.class.php around line 274

				'products_options_values_name' => amDB::input($name)

and REPLACE it with

				'products_options_name' => amIconv(amDB::input($name))

 

4. FIND in catalog\admin\attributeManager\classes\attributeManager.class.php around line 319

						'products_options_values_name' => amDB::input($name)

and REPLACE it with

				'products_options_values_name' => amIconv(amDB::input($name))

 

That's it. Try and, please, let me note about results!

Share this post


Link to post
Share on other sites

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

 

This should be added in the install docs.....

Share this post


Link to post
Share on other sites

BEWARE some of the files in this contrib use php short_open_tags and ARE NOT compatible with all server setups and apparently are not XML compliant.

 

Where this applies replace the '<=' with '<?php echo'

 

AND '<? ' with the more standard '<?php'

 

Todd

Edited by lildog

Share this post


Link to post
Share on other sites

Hello,

 

I have used this contribution for quite some time and love everything that it does to make my life easier, but I have now begun to have an issue with the download portion of the contribution. I created a template with two options of download (MAC and PC) and now after I set the values for each and update the item, sometimes the attributes aren't saved. I will go back in and edit the item and there isn't a filepath set for the download.

 

Has anyone else encountered this issue and have a solution?

 

Thanks,

 

B.

Share this post


Link to post
Share on other sites

Hello,

 

I have used this contribution for quite some time and love everything that it does to make my life easier, but I have now begun to have an issue with the download portion of the contribution. I created a template with two options of download (MAC and PC) and now after I set the values for each and update the item, sometimes the attributes aren't saved. I will go back in and edit the item and there isn't a filepath set for the download.

 

Has anyone else encountered this issue and have a solution?

 

Thanks,

 

B.

Do you have paths to download attributes in English only or there are simbols from your own language? If yes, could you say what language do you use when attributes saves normally and in case of not? But I may be on wrong way.

Edited by RusNN

Share this post


Link to post
Share on other sites

Do you have paths to download attributes in English only or there are simbols from your own language? If yes, could you say what language do you use when attributes saves normally and in case of not? But I may be on wrong way.

 

My attributes are all in English. The path is straight to the /download dir. Nothing fancy. I am now encountering the path being saved, then not being there some time later.

Share this post


Link to post
Share on other sites

Hi, after installing and bugfixing:

 

1) Ajax Attribute manager

2) QTpro

3) Attribute sort order

 

I have come to the conclusion that these are essential in getting the intended functionality to work properly.

 

So, I suggest that someone with the patient and skills combine these 3 into one contribution.

 

I also wonder if there is a way to bind attributes to categories? Let me explain...

 

Suppose you are selling fashion, like shoes, dresses and so on, it would be very nice if the attributes for shoes doesn't show up among the attributes for the dresses and vice versa. On a large store with lots of different categories it would certainly ease things up.

 

Any suggestions?

 

Kindest

 

Sara

Share this post


Link to post
Share on other sites

I also wonder if there is a way to bind attributes to categories? Let me explain...

 

Suppose you are selling fashion, like shoes, dresses and so on, it would be very nice if the attributes for shoes doesn't show up among the attributes for the dresses and vice versa. On a large store with lots of different categories it would certainly ease things up.

I'm not shure I understand the idea. We make an option and add some values for it. So we can separate option for shoes from option for dress and they does not mix up. Usinng AJAX AM we add shoes options for shoes only and dresses options for dresses only. On product page say for shoes we will see only options available for shoes.

Share this post


Link to post
Share on other sites

Hello, the idea is quite simple:

Shoes and dresses are in different categories (folders).

Today, if you edit a product let say a shoe. The attribute manager will also show the options for dresses.

 

What I am suggesting is that an option defined for dresses should never show up when editing shoes.

 

Kind regards

 

Sara

Share this post


Link to post
Share on other sites

I have a a little problem:

 

When I try to tick the box for tracking stock, there is no respons.

I do have Qtpro installed and AM_USE_QT_PRO is set to true.

 

Is the problem here:

 

if(AM_USE_QT_PRO) {

$return .=' <td>'.AM_AJAX_TRACK_STOCK.' <img src="attributeManager/images/icon_unchecked.gif" id="imgCheck_1" onclick="checkBox(1)" title="'.AM_AJAX_TRACK_STOCK_IMGALT.'" />

'. tep_draw_hidden_field('stockTracking_1', '0', $style).'

</td>';

In "attributeManagePrompts.inc.php ?

 

Sara

Share this post


Link to post
Share on other sites

I have a a little problem:

 

When I try to tick the box for tracking stock, there is no respons.

 

Find in catalog\admin\attributeManager\javascript\attributeManager.js function

function checkBox(id) {

   if(check[id] != true) //if a value is not true, use this rather than == false, 'cos the first time no value will be set and it will be undefined, not true or false
       {
       document.getElementById('imgCheck_' + id).src = "attributeManager/images/icon_unchecked.gif"; // change the image
       document.getElementById('stockTracking_' + id).value = "0"; //change the field value
       check[id] = false; //change the value for this checkbox in the array
       }
   else
       {
       document.getElementById('imgCheck_' + id).src = "attributeManager/images/icon_checked.gif";
       document.getElementById('stockTracking_' + id).value = "1";
       check[id] = true;
       }
}

and REPLACE with

function checkBox(id) {

   if(check[id] != true) //if a value is not true, use this rather than == false, 'cos the first time no value will be set and it will be undefined, not true or false
       {
       document.getElementById('imgCheck_' + id).src = "attributeManager/images/icon_unchecked.gif"; // change the image
       document.getElementById('stockTracking_' + id).value = "1"; //change the field value
       check[id] = true; //change the value for this checkbox in the array
       }
   else
       {
       document.getElementById('imgCheck_' + id).src = "attributeManager/images/icon_checked.gif";
       document.getElementById('stockTracking_' + id).value = "0";
       check[id] = false;
       }
}

or vice versa. If your function looks like the second, try the first.

 

Note the difference in lines with numbers .value = ""; and in two lines with check[id] =

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

×