Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

Recommended Posts

I have Ajax Attribute Manager displaying and "working", sort of, at least with no errors.

 

When I sort and Save, the changes are not applying on the front end.

 

Is this supposed to be working properly right now, or do I have to install the other plugin - Product Attributes Sort Order v1.0 to sort properly?

 

Thank you.

Edited by tonymatt
Link to comment
Share on other sites

QT PRO ISSUE.

 

I have installed qtpro and is working fine, I ahve also set "use qtpro" to "true" in the class file.

 

See image attached....

 

This is what i see once the qtpro is true - however it does nothing, when i click the green button it just goes back to the product listing with doing anything

 

 

anyone else had this issue???

 

QT PRO ISSUE.

 

I have installed qtpro and is working fine, I ahve also set "use qtpro" to "true" in the class file.

 

See image attached....

 

This is what i see once the qtpro is true - however it does nothing, when i click the green button it just goes back to the product listing with doing anything

 

 

anyone else had this issue???

post-268503-0-19077800-1329142150_thumb.jpg

Edited by gfasal
Link to comment
Share on other sites

Hello all,

 

I need your help as I am new to this. I am trying to set up a store where i will also sell t shirts. I installed Ajax attribute manager and i created all the attributes i needed like type: female and male, colour and size.

 

Now, there comes my question: how can i set up the attributes so that after someone choses type: female, the colour and sizes dropdowns will narrow the results, and after the customer choses the colour, the size dropdown also narrows the result.

 

Example: type female: only 3 colours and 4 sizes; type female, colour white: only 1 size.

 

Please help. Thank you.

Link to comment
Share on other sites

 

 

around line 244

 

if(AM_USE_SORT_ORDER) {

?>

<?php echo tep_draw_input_field("sortOrder_$optionValueId",$optionValueInfo['sortOrder'],' style="margin:3px 0px 3px 0px;" id="sortOrder_'.$optionValueId.'" size="4" onChange="return amUpdate(\''.$optionId.'\',\''.$optionValueId.'\');"'); ?>

<?php

}

?>

 

remove the //

 

Thank you very much, hard to believe that this functionality was already there :)

 

Much appreciated

 

Dave

Link to comment
Share on other sites

I have a question about how this functions with QT Pro, which I hope someone can help with...

 

I sell for example a race kit made up of a jersey, pants and gloves.

 

Jerseys range from S - XXL

Pants from 28 - 38"

and gloves from S - XXL

 

Now that's quite a few options. What I thought I would be able to do with this was to put a quantity next to each item. e.g.

 

Jerseys

 

S = 1

M =10

L = 9

XL = 11.. etc

 

then the same with pants

 

28" = 5

30" = 6...etc

 

Gloves

 

S = 3

M = 5...etc

 

and so on.

 

But all I seem to be able to do it to pair everything together

 

so I have to enter

 

Jersey Pants Gloves

S = 1 28=1 S=1

 

and I have to try and think of every possible combination that a customer might select.

 

Is this how its supposed to work?

 

Any advice appreciated :)

 

Dave

Edited by stubbsy
Link to comment
Share on other sites

  • 1 month later...

Hello.

 

I use Ajax Attributes Manager in all my stores and it always worked fine. But after upgrading to PHP 5.2.17 + Ngynx in one of our servers, all stores there started showing this error on product edit page:

'There was an error while retrieving the URL: not acceptable'

And Ajax Attributes Manager won't show on the page. Everything else works fine and product can be edited normally, except for the attributes. Stores on other servers do not show this error.

 

Can anyone shed a light on how to fix this? I've googled the error and could only find a couple of instances in this forum but no solution.

 

TIA for any help. :)

Patty

Link to comment
Share on other sites

I am having a similar issue to the poster above.

 

When trying to load a template while on the product page, I will get the following error:

 

"There was an error while retrieving the URL: Internal Server Error"

 

When I save the product and go back in, it has loaded part of the template.

 

thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hey Folks,

 

Trying to get this contrib up and running but seem to be having a similar problem that I see others are having. Haven't found a solution yet though...

 

OS Com 2.3.1 using the newest version of the contrib 2.8.9.3

 

Seems to have installed fine, I don't get any missing include errors.

 

When I add a new product I noticed the following message below price: "Save Product before adding options"

 

I save my product and come back to edit it and I don't see any Attribute options. Under price is "Products Description".

 

Is there any other trick I need to do in order to properly activate this contrib?

 

Or can anyone recomend a contrib that allows me to select Attributes on product entry?

 

Thanks!

Freelance Web Developer

Link to comment
Share on other sites

Hello.

 

I use Ajax Attributes Manager in all my stores and it always worked fine. But after upgrading to PHP 5.2.17 + Ngynx in one of our servers, all stores there started showing this error on product edit page:

'There was an error while retrieving the URL: not acceptable'

And Ajax Attributes Manager won't show on the page. Everything else works fine and product can be edited normally, except for the attributes. Stores on other servers do not show this error.

 

Can anyone shed a light on how to fix this? I've googled the error and could only find a couple of instances in this forum but no solution.

 

TIA for any help. :)

Still trying to find a way to fix this. Was anyone able to fix this be kind enought to share the solution with us?

TIA

Patty

Link to comment
Share on other sites

After days searching and trying, finally found the solution for the 'There was an error while retrieving the URL: not acceptable'

 

Open file admin/attributeManager/javascript/requester.js and around line 63 comment out or just delete this line of code:

this.commInterface.setRequestHeader("Content-Type", "text/html; charset="+e);

Problem solved! :)

BTW this is an issue on PHP version 5.2.16 and later. Error doesn't happen on earlier versions.

Edited by Patty

Patty

Link to comment
Share on other sites

Im getting this after trying to install

 

Im assuming this is where the attributes manager is meant to be?

 

Can anyone help?

This will overwrite this products current options and cannot be undone.'); define('AM_AJAX_NEW_TEMPLATE_NAME_HEADER', 'Please enter a new name for the new Template. Or...'); define('AM_AJAX_NEW_NAME', 'New Name:'); define('AM_AJAX_CHOOSE_EXISTING_TEMPLATE_TO_OVERWRITE', ' ...

... Choose an existing one to overwrite'); define('AM_AJAX_CHOOSE_EXISTING_TEMPLATE_TITLE', 'Existing:'); define('AM_AJAX_RENAME_TEMPLATE_ENTER_NEW_NAME', 'Please enter the new name for the %s Template'); define('AM_AJAX_PROMPT_DELETE_TEMPLATE', 'Are you sure you want to delete the %s Template?

This cannot be undone!'); //attributeManager.php define('AM_AJAX_ADDS_ATTRIBUTE_TO_OPTION', 'Adds the selected attribute on the left to the %s option'); define('AM_AJAX_ADDS_NEW_VALUE_TO_OPTION', 'Adds a new value to the %s option'); define('AM_AJAX_PRODUCT_REMOVES_OPTION_AND_ITS_VALUES', 'Removes the option %1$s and the %2$d option value(s) below it from this product'); define('AM_AJAX_CHANGES', 'Changes'); define('AM_AJAX_LOADS_SELECTED_TEMPLATE', 'Loads the selected template'); define('AM_AJAX_SAVES_ATTRIBUTES_AS_A_NEW_TEMPLATE', 'Saves the current attributes as a new template'); define('AM_AJAX_RENAMES_THE_SELECTED_TEMPLATE', 'Renames the selected template'); define('AM_AJAX_DELETES_THE_SELECTED_TEMPLATE', 'Deletes the selected template'); define('AM_AJAX_NAME', 'Name'); define('AM_AJAX_ACTION', 'Action'); define('AM_AJAX_PRODUCT_REMOVES_VALUE_FROM_OPTION', 'Removes %1$s from %2$s, from this product'); define('AM_AJAX_MOVES_VALUE_UP', 'Moves option value up'); define('AM_AJAX_MOVES_VALUE_DOWN', 'Moves option value down'); define('AM_AJAX_ADDS_NEW_OPTION', 'Adds a new option to the list'); define('AM_AJAX_OPTION', 'Option:'); define('AM_AJAX_VALUE', 'Value:'); define('AM_AJAX_PREFIX', 'Prefix:'); define('AM_AJAX_PRICE', 'Price:'); define('AM_AJAX_SORT', 'Sort:'); define('AM_AJAX_ADDS_NEW_OPTION_VALUE', 'Adds a new option value to the list'); define('AM_AJAX_ADDS_ATTRIBUTE_TO_PRODUCT', 'Adds the attribute to the current product'); define('AM_AJAX_QUANTITY', 'Quantity'); define('AM_AJAX_PRODUCT_REMOVE_ATTRIBUTE_COMBINATION_AND_STOCK', 'Removes this attribute combination and stock from this product'); define('AM_AJAX_UPDATE_OR_INSERT_ATTRIBUTE_COMBINATIONBY_QUANTITY', 'Update or Insert the attribute combination with the given quantity'); //attributeManager.class.php define('AM_AJAX_TEMPLATES', '-- Templates --'); //---------------------------- // Change: download attributes for AM // // author: mytool //----------------------------- define('AM_AJAX_FILENAME', 'File'); define('AM_AJAX_FILE_DAYS', 'Days'); define('AM_AJAX_FILE_COUNT', 'Max. downloads'); define('AM_AJAX_DOWLNOAD_EDIT', 'Edit download option'); define('AM_AJAX_DOWLNOAD_ADD_NEW', 'Add download option'); define('AM_AJAX_DOWLNOAD_DELETE', 'Delete download option'); define('AM_AJAX_HEADER_DOWLNOAD_ADD_NEW', 'Add download option for \"%s\"'); define('AM_AJAX_HEADER_DOWLNOAD_EDIT', 'Edit download option for \"%s\"'); define('AM_AJAX_HEADER_DOWLNOAD_DELETE', 'Delete download option from \"%s\"'); define('AM_AJAX_FIRST_SAVE', 'Save Product before adding options'); //---------------------------- // EOF Change: download attributes for AM //----------------------------- define('AM_AJAX_OPTION_NEW_PANEL','New option:'); ?>

This will overwrite this products current options and cannot be undone.'); define('AM_AJAX_NEW_TEMPLATE_NAME_HEADER', 'Please enter a new name for the new Template. Or...'); define('AM_AJAX_NEW_NAME', 'New Name:'); define('AM_AJAX_CHOOSE_EXISTING_TEMPLATE_TO_OVERWRITE', ' ...

... Choose an existing one to overwrite'); define('AM_AJAX_CHOOSE_EXISTING_TEMPLATE_TITLE', 'Existing:'); define('AM_AJAX_RENAME_TEMPLATE_ENTER_NEW_NAME', 'Please enter the new name for the %s Template'); define('AM_AJAX_PROMPT_DELETE_TEMPLATE', 'Are you sure you want to delete the %s Template?

This cannot be undone!'); //attributeManager.php define('AM_AJAX_ADDS_ATTRIBUTE_TO_OPTION', 'Adds the selected attribute on the left to the %s option'); define('AM_AJAX_ADDS_NEW_VALUE_TO_OPTION', 'Adds a new value to the %s option'); define('AM_AJAX_PRODUCT_REMOVES_OPTION_AND_ITS_VALUES', 'Removes the option %1$s and the %2$d option value(s) below it from this product'); define('AM_AJAX_CHANGES', 'Changes'); define('AM_AJAX_LOADS_SELECTED_TEMPLATE', 'Loads the selected template'); define('AM_AJAX_SAVES_ATTRIBUTES_AS_A_NEW_TEMPLATE', 'Saves the current attributes as a new template'); define('AM_AJAX_RENAMES_THE_SELECTED_TEMPLATE', 'Renames the selected template'); define('AM_AJAX_DELETES_THE_SELECTED_TEMPLATE', 'Deletes the selected template'); define('AM_AJAX_NAME', 'Name'); define('AM_AJAX_ACTION', 'Action'); define('AM_AJAX_PRODUCT_REMOVES_VALUE_FROM_OPTION', 'Removes %1$s from %2$s, from this product'); define('AM_AJAX_MOVES_VALUE_UP', 'Moves option value up'); define('AM_AJAX_MOVES_VALUE_DOWN', 'Moves option value down'); define('AM_AJAX_ADDS_NEW_OPTION', 'Adds a new option to the list'); define('AM_AJAX_OPTION', 'Option:'); define('AM_AJAX_VALUE', 'Value:'); define('AM_AJAX_PREFIX', 'Prefix:'); define('AM_AJAX_PRICE', 'Price:'); define('AM_AJAX_SORT', 'Sort:'); define('AM_AJAX_ADDS_NEW_OPTION_VALUE', 'Adds a new option value to the list'); define('AM_AJAX_ADDS_ATTRIBUTE_TO_PRODUCT', 'Adds the attribute to the current product'); define('AM_AJAX_QUANTITY', 'Quantity'); define('AM_AJAX_PRODUCT_REMOVE_ATTRIBUTE_COMBINATION_AND_STOCK', 'Removes this attribute combination and stock from this product'); define('AM_AJAX_UPDATE_OR_INSERT_ATTRIBUTE_COMBINATIONBY_QUANTITY', 'Update or Insert the attribute combination with the given quantity'); //attributeManager.class.php define('AM_AJAX_TEMPLATES', '-- Templates --'); //---------------------------- // Change: download attributes for AM // // author: mytool //----------------------------- define('AM_AJAX_FILENAME', 'File'); define('AM_AJAX_FILE_DAYS', 'Days'); define('AM_AJAX_FILE_COUNT', 'Max. downloads'); define('AM_AJAX_DOWLNOAD_EDIT', 'Edit download option'); define('AM_AJAX_DOWLNOAD_ADD_NEW', 'Add download option'); define('AM_AJAX_DOWLNOAD_DELETE', 'Delete download option'); define('AM_AJAX_HEADER_DOWLNOAD_ADD_NEW', 'Add download option for \"%s\"'); define('AM_AJAX_HEADER_DOWLNOAD_EDIT', 'Edit download option for \"%s\"'); define('AM_AJAX_HEADER_DOWLNOAD_DELETE', 'Delete download option from \"%s\"'); define('AM_AJAX_FIRST_SAVE', 'Save Product before adding options'); //---------------------------- // EOF Change: download attributes for AM //----------------------------- define('AM_AJAX_OPTION_NEW_PANEL','New option:'); ?>

Link to comment
Share on other sites

  • 2 weeks later...

Hi can anyone help me?

 

I have installed the Attribute Manager on OSC 2.3.1, i found all the code that i needed to change and add to, however the AJAX manager doesn't seem to load at all, i've tried Chrome and IE9 neither show AJAX on a new item or editing an existing item.

 

I have CK Editior installed too, i'm not sure if it conflicts at all? i don't really want to comment it out as i can't remember all the files where this was tagged in.

 

AJAXattributeManagerError.jpg

Any ideas anyone?

my template_top code where i reckon it's killing it, CKEditor is here would this interfere

 

 

<?php

if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {

?>

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js'); ?>"></script>

<script type="text/javascript">

$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);

</script>

<?php

}

?>

 

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.js'); ?>"></script>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script type="text/javascript" src="includes/general.js"></script>

<!-- AJAX Attribute Manager -->

<?php

if ((basename($_SERVER["SCRIPT_NAME"]) == FILENAME_CATEGORIES)) {

require('attributeManager/includes/attributeManagerHeader.inc.php');

}

?>

<!-- AJAX Attribute Manager end -->

</head>

<body onload="goOnLoad();">

<?php

if (!defined('USE_CKEDITOR_ADMIN_TEXTAREA')) {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) values ('', 'Use CKEditor', 'USE_CKEDITOR_ADMIN_TEXTAREA','true','Use CKEditor for WYSIWYG editing of textarea fields in admin',1,99,now(),'tep_cfg_select_option(array(\'true\', \'false\'),' )");

define ('USE_CKEDITOR_ADMIN_TEXTAREA','true');

}

if (USE_CKEDITOR_ADMIN_TEXTAREA == "true") {

?>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>

<script type="text/javascript">

$(function() {

var $editors = $('textarea');

if ($editors.length) {

$editors.each(function() {

var editorID = $(this).attr("id");

var instance = CKEDITOR.instances[editorID];

if (instance) { CKEDITOR.remove(instance); }

CKEDITOR.replace(editorID);

});

}

});

</script>

<?php

}

?>

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

 

<?php

if (tep_session_is_registered('admin')) {

include(DIR_WS_INCLUDES . 'column_left.php');

} else {

?>

Link to comment
Share on other sites

  • 2 weeks later...

i tried to install this mod and then uninstalled it (just removing the folder and edits i did) and now it seems im getting a error when i insert a attribute to a product the regular way.

 

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

 

insert into products_attributes values (null, '166', '1', '5', '0', '+')

 

[TEP STOP]

 

 

the mod isnt installed...am i doing something wrong here?

Link to comment
Share on other sites

Hi.

  1. I have to ask one question.
  2. I must apologize for my bad English

For my shop I need to make options in another options.

For one easy comprehension, I have an example.

We sell custom electric bicycle, we have more of 20 options and some of this options are only available if another options is used.

We have 6 types of motors and each one is available with two or three different frame but each frame is NOT available in all size.

I need to have the possibility of configure each option...

What colours available for each frame available for each motors... we have many combinations but I need to set these options so that customers can not order unavailable combination

 

thanks

Edited by Budington
Link to comment
Share on other sites

I install AJAX Attribute Manager on 2.3.1 site, no errors, all looks like working, but, I'm able to change or add attributes in original OS file for given product with no problem, but not in category/product page. If I open any product to edit and select any attribute from drop down menu it will show the selection for a second than in a second changed back to first option, so I'm unable to select any attribute to that product. Any help will be appreciated.

Link to comment
Share on other sites

When adding attributes: lets say we have three options, each with three options.

 

How can we force the option box to read "Select Option" instead of having the first option in that tree displayed as default????

Link to comment
Share on other sites

When adding attributes: lets say we have three options, each with three options.

 

How can we force the option box to read "Select Option" instead of having the first option in that tree displayed as default????

 

http://www.oscommerce.com/forums/topic/357940-qtpro-multiple-dropdowns-please-select-option/

Link to comment
Share on other sites

to fix utf-8 characters in attributes this worked for me:

 

in attributeManager.js change:

 

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

to:

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

 

I only use one language on the store and it has a CHARSET value set to "UTF-8" in the config, dunno if there would be more changesd needed for multiple languages that do not use UTF-8 as their charset (... in which case why are you not using UTF-8 in the first place?).

 

cheers

Link to comment
Share on other sites

anyone happen to know why this doesn't allow ':' in the attribute names/ attribute values?

for instance if you try to add an Option named '1234:5678' you get an Option named '1234', the rest of it is dropped.same for values.

 

I've been trying to identify in which part of the code the ':' gets dropped but it's all one big jumble, no coherence :( :(

 

there always seems to be an extra '4:' in the submitted value ... /attributeManager/attributeManager.php?amAction=addOption&options=4:123%20%3A%204566&optionSort=1 <--- I think this refers to the id="4" in the popup dialogue, but still why does that get put in there? and how can I stop it from interfeering with the intended value.

 

cheers

Edited by mpalasis
Link to comment
Share on other sites

Found it!...

 

Fix to allow colons ( ' : ' ) in option names and option values:

 

edit attributeManager\classes\attributeManager.class.php

 

look for ( this one is inside function addOption($get) { ...} )

list($langId,$name) = explode(':',$option);

change it to:

list($langId,$name) = explode(':',$option, 2);

 

and

 

look for ( this one is inside function addOptionValue($get) { ...} )

list($langId,$name) = explode(':',$optionValue);

change it to:

list($langId,$name) = explode(':',$optionValue, 2);

 

Done!

 

if you want to be able to add ':' in template names , look for explode(':',$templateName); and change it to explode(':',$templateName,2);

 

I've given this a quick test and looks ok, lemme know if I missed anything ;)

 

enjoy

Link to comment
Share on other sites

Problem:

Before installing attribute manager:

In categories.php you could hit enter to submit the form; when the cursor was in a regular text field (<input type="text"...>).

 

After installing attribute manager:

Hitting Enter no longer submits the form when the cursor is in regular text fields!

 

Anyone happen to know what the culprit is and how to fix this?

 

ta

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