Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

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 :'(

Link to comment
Share on other sites

  • 2 weeks later...

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,

Link to comment
Share on other sites

  • 2 weeks later...

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]

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
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.

Link to comment
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!

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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] =

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