Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

Recommended Posts

  • 3 weeks later...

Just a tip:

If you really want this addon to work, change your error reportig level in admin/includes/application.top to:

 

// Report ALL errors:

error_reporting(-1);

 

Then go into your admin and try to add/edit a product.

 

In your admin folder you should have an "error_log" have a look into it and fix the errors until the error_log is empty.

 

Next install kiss error handler and debugging (find it among the contributions) on the admin side.

 

Then go into your admin and try to add/edit a product.

 

In your admin folder you should have an "errors" -folder open the error file in it and fix all errors.

 

Good Luck!

 

Sara

Link to comment
Share on other sites

Hello, I am using v2.8.9 plus QTpro. I have fixed all bugs in those, there were a lot of them :)

 

When a site is multilingual you have to select your prefered language to see all the possibilities with AAM.

 

No default language is set when AAM loads. So, how do you set a default language?

 

The section where it should be done is:

		<?php
	$languages = tep_get_languages();
	if(count($languages) > 1) {
		foreach ($languages as $amLanguage) {
		?>
<!--Original//-->
		 <input type="image" src="<?php echo DIR_WS_CATALOG_LANGUAGES . $amLanguage['directory'] . '/images/' . $amLanguage['image'];?>" title="<?php echo AM_AJAX_CHANGES;?>" <?php echo ($attributeManager->getSelectedLanguage() == $amLanguage['id']) ? 'style="padding:1px;border:1px solid black" onclick="return false;";':'onclick="return amSetInterfaceLanguage(\''.$amLanguage['id'].'\')";';?> >
		<?php
		}
	}
//Set default language here, id=1:
		?>

Any ideas?

 

Sara

Link to comment
Share on other sites

  • 2 weeks later...

I just tried the Ajax product attributes for 2.3.1 add on and it seems the instructions are cut short.

note.. the description of that add-on does not point to this forum thread. There is no support thread for it.

Also note, the profile page of the add-on contributor indicates he has been a member since last September but has

made ZERO posts to the forum

 

I had really hoped this worked because I have a lot of products that share identical options.

After adding it, trying to assign an option to a product via the unedited /admin/products_attributes.php

I get a mysql error, value/column mismatch on insert to 'products_attributes'

 

I also found, that while there is no mention of it, the add-on apparently adds a column to the 'products_attributes' table. Of course /admin/products_attributes.php does not know about this new column, so naturally fails on insert.

 

At this point, my only option is uninstall it.. undoing changes indicated in the install.txt , and then finally

via PHPMyAdmin

 ALTER TABLE `products_attributes` DROP `products_options_sort_order` 

 

After that I can at least assign product attributes the old fashioned way...

 

I am really hopeful someone will pick up the ball, sort out this much needed but apparently broken and abandoned add-on for 2.3.1 I'd give it a go, but am on paying projects for the next few weeks, and unfortunately, eating is favorable to not eating.

Edited by dewed

Just call me Dewed ...

Link to comment
Share on other sites

  • 3 weeks later...

There is still a bug when using QTpro;

The field 'products_quantity' in table 'products' is not updated.

If you use the QTpro manager to update the attributes stock this table gets updated as well (and not only 'products_stock').

 

Example:

If you have two attributes and 5 pcs of each you have a total of 10 pcs in 'products_quantity'.

If you then go and edit this product and update the attribute stock to 10 pcs of each you should have a total of 20 pcs in 'products_quantity'. But it still ends up with a total of 10 pcs.

 

This could be very crucial

If you have set your store so your products become inactive while they are out of stock, then your product will be inactive in the store before its actually out of stock.

It’s become inactive when 'products_quantity' in table 'products' has the value 0, even thou you have a positive value in the field 'products_stock_quantity' in the 'table products_stock'.

 

 

Does anyone have a fix or thoughts about this?

 

//Fredrik

Link to comment
Share on other sites

There is still a bug when using QTpro;

The field 'products_quantity' in table 'products' is not updated.

If you use the QTpro manager to update the attributes stock this table gets updated as well (and not only 'products_stock').

 

Example:

If you have two attributes and 5 pcs of each you have a total of 10 pcs in 'products_quantity'.

If you then go and edit this product and update the attribute stock to 10 pcs of each you should have a total of 20 pcs in 'products_quantity'. But it still ends up with a total of 10 pcs.

 

This could be very crucial

If you have set your store so your products become inactive while they are out of stock, then your product will be inactive in the store before its actually out of stock.

It’s become inactive when 'products_quantity' in table 'products' has the value 0, even thou you have a positive value in the field 'products_stock_quantity' in the 'table products_stock'.

 

 

Does anyone have a fix or thoughts about this?

 

//Fredrik

 

I looked into this abit more. And it does update as it should. The problem is that if you continue and hit the "Preview" button the value in the field "Products Quantity:" over-write the the value AJAX Attribute Manager set in 'products_quantity'.

 

So it would be nice with a solution for this.

Link to comment
Share on other sites

Hello there!

 

I get the following error when adding a new product:

 

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:'); ?>

 

Anyone got an idea? :S

 

Thanks in advance!

Link to comment
Share on other sites

Looks like the language file content.

 

Just a hunch but. . . .

Triple check that all files were uploaded to the correct locations, and in

ASCII/txt format, not as binary files.

 

It almost looks like the opening PHP tag was removed from the language file

Just call me Dewed ...

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I just added the contr. it worked perfectly when I added only few attributes.

So i started add more - 5 attributes with 100 values in each ( for prescription glasess)

I saved it as a template and when I add preview to save the product the description is missing.

 

Now when I apply the template to the existing product, im loosing the descriptiopn, same happes when I want to add a new product.

 

anyone help?

 

im using template from templatemonster osc 2.2 rc2

 

Thanks in advance

Link to comment
Share on other sites

I noticed that when I add template with smaller number of values the description is OK.

any help is appreciated.

 

 

 

Hi,

 

I just added the contr. it worked perfectly when I added only few attributes.

So i started add more - 5 attributes with 100 values in each ( for prescription glasess)

I saved it as a template and when I add preview to save the product the description is missing.

 

Now when I apply the template to the existing product, im loosing the descriptiopn, same happes when I want to add a new product.

 

anyone help?

 

im using template from templatemonster osc 2.2 rc2

 

Thanks in advance

Link to comment
Share on other sites

  • 3 weeks later...

I installed the AJAX Attribute Manager contribution on osCommerce 2.2-MS2.

 

We too stumbled on the double attributes problem, like when putting in sizes S,M,L the result would be S,M,L,S,M,L

 

This was the case when adding a new product and rightaway setting the attributes.

But when we add a new product to our shop, first save it and after that set the attributes we DON'T get double entries.....

 

I have this problem with AJAX-AttributeManager-V2.8.9.1. I have double entries for the same option. I have done what you said. Firs of all i add the product and then i set the attributes.

 

Does anyone resolved this issue?

 

Thanks ;)

Edited by bjeli
Link to comment
Share on other sites

I never ran into the double attribute bug, but despite it's handiness, it is a quirky mod and simply takes some changes in how you use it.

 

In my case, we found it necessary to flush the product data and start over until we got it right. Sadly that may be the only way to get it right.

 

As the previous poster suggests, do what I call the basic product entry first, name, description, pic, price. basically everything except attributes. Once the product has been saved, then go back and add attributes.

 

Get familiar with the attribute templates. Likely some of your products have at least somewhat similar attributes, and loading a template and tweaking it for a specific product is often much faster than entering them all from scratch.

 

The original OSC product attribute page should not be used at all.

Just call me Dewed ...

Link to comment
Share on other sites

As the previous poster suggests, do what I call the basic product entry first, name, description, pic, price. basically everything except attributes. Once the product has been saved, then go back and add attributes.

 

Get familiar with the attribute templates. Likely some of your products have at least somewhat similar attributes, and loading a template and tweaking it for a specific product is often much faster than entering them all from scratch.

 

 

Thanks for your answer.

 

I often modify product after saved them and i usually use templates. But the user has to modify the prices or sort the options manually. When the user does it, its when the options are repeated.

 

My actual solution is to delete all the doubled option in the products_attributes table with this sql:

 

SELECT pa . `products_attributes_id` , pa . `products_id`

FROM `products_attributes` pa inner join `products_attributes` pb on pa . `products_id` =pb . `products_id` and pa . `options_id` =pb . `options_id` and pa . `options_values_id` =pb . `options_values_id`

WHERE pa . `products_attributes_id` > pb . `products_attributes_id` ORDER BY `pa` . `products_id` ASC

 

But that`s not useful. The user depends on me.

Link to comment
Share on other sites

Sounds like they are adding a new option/value pair rather than adjusting an existing one...

 

Not a solution, but you could add a unique index on the 2 columns involved.. resulting in a duplicate entry error if that is indeed what causes the double entry.

Just call me Dewed ...

Link to comment
Share on other sites

Sounds like they are adding a new option/value pair rather than adjusting an existing one...

 

Not a solution, but you could add a unique index on the 2 columns involved.. resulting in a duplicate entry error if that is indeed what causes the double entry.

 

Sometimes they delete some options.

 

Is this what you said?

thump_63529492columnindex.jpg

 

I don't understand very well but i'll see.

Link to comment
Share on other sites

Sometimes they delete some options.

 

Is this what you said?

thump_63529492columnindex.jpg

 

I don't understand very well but i'll see.

It should be a UNIQUE index, rather than a plain INDEX.

 

I believe you have the correct column names in your 2 column index, I'd have to double check and don't have time right now to be 100% sure

 

If the table contains duplicates, when you change it to UNIQUE, an error will occur indicating which row caused the error. you should be able to delete one of the dupes and attempt the change of the index type again. Once all dupes are removed, you should never get dupes again.

Just call me Dewed ...

Link to comment
Share on other sites

please help ... I installed the latest Version of Ajax Attribute Manager to my oscommerce 2.3.1 - but it doesn't show anything under the price. Before uploading a product at least a questionmark can be seen. From a post before I read, it could be due to my changed name of admin directory. But where would I have to insert my personal admin directory name? Or might the following piece of code from a discount addon in the template_top.php mess it up?:

 

...

 

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

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

 

<!-- AJAX Attribute Manager -->

<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' )?>

<!-- AJAX Attribute Manager end -->

 

</head>

<?php

// Discount Code 2.9 - start

if (basename($PHP_SELF) == FILENAME_DISCOUNT_CODES && isset($action) && $action == 'new') {

//echo '<body onload="onload();">';

} else {

echo '<body>';

}

// Discount Code 2.9 - end

?>

 

...

 

thx, Arved

Link to comment
Share on other sites

please help ...

 

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

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

 

<!-- AJAX Attribute Manager -->

<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' )?>

<!-- AJAX Attribute Manager end -->

 

</head>

<?php

// Discount Code 2.9 - start

.......

 

I just manage to install it. Check that you are using the 2.3 install instructions cos mine looks like this....

<!-- AJAX Attribute Manager -->

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

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

<!-- AJAX Attribute Manager end -->

 

<head>

 

Also if you get a stack code after installing. go to attributeManager/languages/English/attributeManager.php. Change the first line '<?' to '<?php'

Edited by dakaron
Link to comment
Share on other sites

I just manage to install it. Check that you are using the 2.3 install instructions cos mine looks like this....

<!-- AJAX Attribute Manager -->

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

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

<!-- AJAX Attribute Manager end -->

 

<head>

 

Also if you get a stack code after installing. go to attributeManager/languages/English/attributeManager.php. Change the first line '<?' to '<?php'

 

 

 

thx dakaron, I'll delete and to run through it once more ... sure there's no path to change with an admin directoy named other than 'admin'? arved

Link to comment
Share on other sites

thx dakaron, I'll delete and to run through it once more ... sure there's no path to change with an admin directoy named other than 'admin'? arved

 

 

... it was my fault ... repeated the same mistake several times. working now. thx again!

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