Jump to content
Nimmit

AJAX Attribute Manager support

Recommended Posts

 

I'm not sure what you are asking here, but...

 

If you do not make that change to the <body> tag in admin/includes/templates_top.php then the ajax manager will not load.

 

You should also check that the include was added to admin/includes/templates_top.php before the </head> tag:

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

all done

thankyou

good time

Share this post


Link to post
Share on other sites

Hi all,

 

I installed the latest version V2.8.14 on a fresh OSC 2.3.4. While opening/editing a product in admin with catergories.php, the index.php is loaded on the spot where the ajax attribute handler supposed to be loaded. This actually only happens when force use cookies is set to true in configuration/sessions/. If this setting is set to false, the handler is loaded correctly.

This is the same issue as discussed on page on page 62, raised  by xtrgeo, all the solutions discussed after that did not really solved the issue me.

Anyone else faced this issue and eventually have solved? Please share.

 

BR

John

Share this post


Link to post
Share on other sites

Hi all,

 

I installed the latest version V2.8.14 on a fresh OSC 2.3.4. While opening/editing a product in admin with catergories.php, the index.php is loaded on the spot where the ajax attribute handler supposed to be loaded. This actually only happens when force use cookies is set to true in configuration/sessions/. If this setting is set to false, the handler is loaded correctly.

This is the same issue as discussed on page on page 62, raised  by xtrgeo, all the solutions discussed after that did not really solved the issue me.

Anyone else faced this issue and eventually have solved? Please share.

 

BR

John

 

Wow, good find, that is the exact problem I have as well.  Any help on this would be really appreciated!

Share this post


Link to post
Share on other sites

This phenomenon appears, when you set in admin -> configuration -> sessions -> Force Cookie Use to true. Change Force Cookie Use to false!

 

J.J.

Share this post


Link to post
Share on other sites

Anybody tell me.. Where exactly do the "templates" get stored? 

in tables:

am_templates

am_attributes_to_templates

Share this post


Link to post
Share on other sites

Does anyone know the rational for adding the alter table bits in AttributeManagerConfig.class.php? These affect products_weight and other areas and stop one from modifying the tables if one wants something outside of decimal(6,3) and default weight of 0.000.

Edited by Pinball

Share this post


Link to post
Share on other sites

This phenomenon appears, when you set in admin -> configuration -> sessions -> Force Cookie Use to true. Change Force Cookie Use to false!

 

J.J.

 

 

Hi all,

 

I installed the latest version V2.8.14 on a fresh OSC 2.3.4. While opening/editing a product in admin with catergories.php, the index.php is loaded on the spot where the ajax attribute handler supposed to be loaded. This actually only happens when force use cookies is set to true in configuration/sessions/. If this setting is set to false, the handler is loaded correctly.

This is the same issue as discussed on page on page 62, raised  by xtrgeo, all the solutions discussed after that did not really solved the issue me.

Anyone else faced this issue and eventually have solved? Please share.

 

BR

John

 

Hi all,

 

I have just cleared the sessionID from the ajax modules.

 

javascript/attributeManager.js

 

Changed situation in the file:

	if('' != pageAction)
		arRequestString.push('pageAction='+pageAction);
		
//	if('' != sessionId)
//		arRequestString.push(sessionId);

	if(refresh == false) 

includes/attributeManagerHeader.inc.php

 

changed situation in the file:

 

	echo "	var pageAction='".tep_db_prepare_input($_GET['action'])."';"."\n";
//	echo "	var sessionId='".$amSessionVar."';"."\n";
	echo '</script>'."\n";

I dont have more experiencies but its looks like working well.

 

Examination process in oscommerce start new session when cookie force usage is on but called osCAdminID in the URL and after it redirect to index.php with 302.

 

This issue is an ajax - oscommerce conflict in this contribution.

 

I dont have imagination why coded sessionID for ajax if never use it in the ajax codebase..

 

Ajax call oscommerce application_top.php so the session wont be lost if oscommerce does its job.

 

This problem probably due to an anxious case when oscommerce session was more diversed.

 

Moreover this code is unusefull:

 

 

	$amSessionVar = tep_session_name().'='.tep_session_id();

when $amSessionVar is never used in the codebase..

 

 

Best Regards,

Gergely


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Greetings all
 

I've just installed this module on a shop, and I just wanted to say a massive THANKYOU to Nimmit and everyone who has worked on it over the years.

It is a thing of beauty.

The installation is straightforward and quick, and doesn't require manually hacking away at a billion files like most OSC add-ons. It doesn't even require any manual database fiddling. The file layout is modular and self-contained, thus easy to upgrade and to use on different versions of OSC. The widget itself is well designed and although it looks complicated at first, it's intuitive enough to figure out quickly, and does the job superbly. It makes a complicated thing (the handling of attributes/options) a thousand times simpler and faster - especially with the Templates feature which is truly inspired.

 

If only all OSC add-ons were like this!

 

So, good job, and my heartfelt thanks to everyone involved.

 

Ben

Share this post


Link to post
Share on other sites

Greetings all

 

I've just installed this module on a shop, and I just wanted to say a massive THANKYOU to Nimmit and everyone who has worked on it over the years.

It is a thing of beauty.

The installation is straightforward and quick, and doesn't require manually hacking away at a billion files like most OSC add-ons. It doesn't even require any manual database fiddling. The file layout is modular and self-contained, thus easy to upgrade and to use on different versions of OSC. The widget itself is well designed and although it looks complicated at first, it's intuitive enough to figure out quickly, and does the job superbly. It makes a complicated thing (the handling of attributes/options) a thousand times simpler and faster - especially with the Templates feature which is truly inspired.

 

If only all OSC add-ons were like this!

 

So, good job, and my heartfelt thanks to everyone involved.

 

Ben

is there a demo of this

Share this post


Link to post
Share on other sites

Hi @ll !
 

First thank you to everyone who has worked on this very nice contrib ! But one question is left:

 

I have build this in a BS Edge Shop. Everything works, even the sort order of the Attributes.

But actually I dont know why the sort order of the Options itself is not saved. 

 

Example: One Product. Two Options: Color and Size. I'm able to order the red and green and

S, L, XL appearance. But the order of the appearance of the Color- and Size-Dropdowns

will not be saved.

I dont know if its a bug or feature. In the database in products_attributes table the products_options_sort_order field

is filled with the correct numbers. In products_options the products_options_sort_order field is filled with zeros.

Is this prepared for a later version, or have i made a mistake while mounting the contrib into my shop ?

 

Thank you for every help !

 

SEE YA

Denzel.

Share this post


Link to post
Share on other sites

OK, I have found the solution: QTpro makes a difference between stocked and nonstocked attributes. 

The stocked were drawn first, then the nonstocked. Maybe someone can order the array after reading

out of the database. At this point my php knowledges ends  :wacko:

 

SEE YA

Denzel.

Share this post


Link to post
Share on other sites

Have you performed the steps for sorting and QTPro as mentioned in the install file?

Share this post


Link to post
Share on other sites

Hi @@Jack_mcs

 

I have tried almost everything. I think its the same issue that Midijay has descriped a few jears ago. But it is quiet simple: In the draw method of QTpro's pad_base.php the attributes were called one after the other. No chance to sort something. 

    function draw() {
      $out=$this->_draw_table_start();
      $out.=$this->_draw_stocked_attributes();
      $out.=$this->_draw_nonstocked_attributes();
      $out.=$this->_draw_table_end();
      return $out;

But I think I can live with that, while only my testitem has stocked and unstocked attributes. The contrib is a very confusing mixture of different other contribs. Attribute sort is affected (but unnecessary) QTpro has a small saying. Something with weights is in the contrib too. Datadasefields were installed but  not used... I think if you not really know what you are doing, you are slightly overwhelmed with it. And lets try to put this into the modular BS product info...  :-

 

SEE YA

Denzel.

Share this post


Link to post
Share on other sites

Hi @@Denzel,

 

the sort order has been an issue for a while. years back I thought I had fixed it, but the current logic really doesn't account for all factors, and IMO, really fubars the sort. I wouldn't use the arrows. The more attributes you create, the more this contrib gets confused.

 

here's what I do for a work around...

 

make sure you have the sort order components installed for the old stand-by attribute manager, and manually manage the sort order there. It's not ideal, but polishes the job where needed.

Share this post


Link to post
Share on other sites

Hi guys!

I installed to BS Gold: AJAX Attribute Manager - v2.8.14 + Option Types v2 BS http://addons.oscommerce.com/info/9367

AJAX Attribute Manager works 50% / 50% with the types of options.

With the options that are options values CUSTOMER-INPUT - does not work.

 

Works with: Select, Radio, Image. Checkbox.
Does not work with: Text, TextArea, File.

 AJAX Attribute Manager will not work with the option value CUSTOMER-INPUT.

Can you fix it?

Many thanks!


No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

Anyone who got this error

1054 - Unknown column 'products_options_sort_order' in 'field list'
 

select products_attributes_id, options_id, products_options_sort_order from products_attributes where products_id=1046 ORDER BY sort_order asc, options_id asc
 

and have installed 

1. AJAX Attribute Manager
2. Sort Product Option V 1.1
with OSC 2.3.4

This is the way I fixed it.
1. Uninstall "Sort Product Option v 1.1

2. Turn off sorting option in AJAX Attribute Manager

3. Use the solution in this topic, it works great for me.

http://forums.oscommerce.com/topic/123629-sorting-attributes/

It can only

First - sorts by price

Second - if price is same (or 0), it sorts based on the order that the option was entered.

But that's all I need.  and it works.
Hope someone find this useful.

 

Edited by poj_ud

Share this post


Link to post
Share on other sites

post-311526-0-63042900-1479041435_thumb.jpgHello to all,

 

Having used this contribution for years without a hitch I was preparing for the web hoster's switch to php 7... bad news, even having changed the class constructors as per php 7 standards the add-on shows but no longer functions. On the product page no option shows up in the attribute manager and other functions are missing as well (see image). I just does not seem to call the database at all. Really desperate for a solution, having struggled with it for 2 days.

 

[

 

Thanks in advance

 

Share this post


Link to post
Share on other sites

Same here, an error is generated when opening a product in admin by this code in requester.js:

 

/* Execute the action which has been associated with the completion of this object */
Requester.prototype.executeAction = function() {
// If XMLHR object has finished retrieving the data
 
if (this.commInterface.readyState == 4) {
// If the data was retrieved successfully
try {
if (this.commInterface.status == 200) {
this.responseText = this.commInterface.requestXML;
this.action();
}
// IE returns status = 0 on some occasions, so ignore
else if (this.commInterface.status != 0){
alert("There was an error while retrieving the URL: " + this.commInterface.statusText);
}
}
catch (error){}
}
return true;
}
 

Fiddled around with XMLHttpRequest, Access-Control-Allow-Origin header '*' and more, but can't get it right. We're using SSL, exempted the Attribute Manager map from redirect, but that doesn't work either.  

Share this post


Link to post
Share on other sites

@@iTea are you trying to use with php7?

 

As well as the class constructors change, which is easy to spot because you get a deprecated notice, there's also a change to the evaluation order of statements. If affected, the code simply behaves differently so you don't necessarily get an error message; sometimes nothing happens or something works but gets the wrong result. You need to look out for things like $$, ->$ and ::$ in the code. An example from the core code is this:

$secCheck = $$module['class'];

which needed to be changed to

$secCheck = ${$module['class']};

to make it work properly.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

There's an instance in admin/attributeManager/classes/attributeMan/attributeManager.class.php

					$results = $this->$functionName($get);

Try changing it to

					$results = $this->{$functionName($get)};

This line is what makes the ajax do anything, so if it doesn't work the addon would be completely broken.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

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

×