Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Attribute Manager support


Guest

Recommended Posts

can you check your error log in your admin folder for a specific error that would be associated with this Internal Server Error and post that? (you can x-out any directory paths in the error)

Link to comment
Share on other sites

@@surfalot
 
Hi Jeep/Todd,
 
I think that was an old bug now I built my own and ended up with this at the bottom of attributeManagerGeneralFunctions.inc.php but no idea if it would conflict with your version.
 

function &amGetAttributeManagerInstance($get) {
	
	if (!is_numeric($get['products_id']) || AM_ATOMIC_PRODUCT_UPDATES) {

		// first time visiting the page - delete the session var and start again
		if('new_product' == $get[AM_PAGE_ACTION_NAME] && !tep_not_null($get[AM_ACTION_GET_VARIABLE])) 
			amSessionUnregister(AM_SESSION_VAR_NAME);	
			
			amSessionRegister(AM_SESSION_VAR_NAME, array());
	
		$attributeManager =new attributeManagerAtomic(amGetSesssionVariable(AM_SESSION_VAR_NAME));
		//$attributeManager = new attributeManagerAtomic(amGetSessionVariable(AM_SESSION_VAR_NAME));
	}
	else
		//$attributeManager =& new attributeManagerInstant($_GET['products_id']);
		$attributeManager =new attributeManagerInstant($_GET['products_id']); 
		
	return $attributeManager;
}

?>

 
 
I believe it only occurred when a product in the first instance had no attributes assigned but disappeared upon page reload in admin and was referring to
 
 

/* Initialise XMLHR object and load URL */
Requester.prototype.loadURL = function(URL, CGI) {
	this.resetXMLHR();
	
	this.commInterface.open("GET", URL + "?" + CGI);
	var e=(document.charset||document.characterSet||'ISO-8859-8-i');
	this.commInterface.setRequestHeader("Content-Type", "text/html; charset="+e);
	this.commInterface.setRequestHeader('Accept-Charset',e);
	this.commInterface.send(null);

	return true;
}

Regards

Joli

Edited by joli1811
To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

firebug only reports that it occurs at line 65 of requester.js

 

-Jeep

 

The message I'm asking for can't be found in Firebug.  The error is a server error related to something that the server doesn't like in PHP.  You should have an error log, maybe called "error_log" within the admin directory in your site's hosting space on the server.  your error log should update with an error message each time this happens.  If you don't see it, ask your host if they can enable error logging on your site.

Link to comment
Share on other sites

But no option to add products will not be displayed on the page.

are you looking on the "Products Attributes" admin page, or the product edit page?  If it is installed correctly, when you open an existing product for edit, a gray box should appear just below the product pricing.

Link to comment
Share on other sites

are you looking on the "Products Attributes" admin page, or the product edit page?  If it is installed correctly, when you open an existing product for edit, a gray box should appear just below the product pricing.

I do not see nothing new in the product edit page

Link to comment
Share on other sites

have you fixed the problem of the Attribute Manager showing on the Product Edit page? If so, can you tell us what the problem was?

 

 

How can I translate Farsi ?

I change the file english/attributeManager.php but I did not read the letters

If you need to translate the Attribute Manager's text to Farsi, then you should create a new folder under /admin/attributeManager/languages/[yourlanguage]. Copy the english language file from /admin/attributeManager/languages/english/attributeManager.php to your language folder. The name of the folder would be the same as the language folder used for languages in the main shop: admin/includes/languages/[yourlanguage].  So your new language file would be at: /admin/attributeManager/languages/[yourlanguage]/attributeManager.php.   

 

So if you main language folder is "farsi", your new language file for Attribute Manager would be: /admin/attributeManager/languages/farsi/attributeManager.php.  Then simply translate the language in the attributeManager.php file to farsi.  

 

hope that helps.

Edited by surfalot
Link to comment
Share on other sites

have you fixed the problem of the Attribute Manager showing on the Product Edit page? If so, can you tell us what the problem was?

 

 
 

If you need to translate the Attribute Manager's text to Farsi, then you should create a new folder under /admin/attributeManager/languages/[yourlanguage]. Copy the english language file from /admin/attributeManager/languages/english/attributeManager.php to your language folder. The name of the folder would be the same as the language folder used for languages in the main shop: admin/includes/languages/[yourlanguage].  So your new language file would be at: /admin/attributeManager/languages/[yourlanguage]/attributeManager.php.   

 

So if you main language folder is "farsi", your new language file for Attribute Manager would be: /admin/attributeManager/languages/farsi/attributeManager.php.  Then simply translate the language in the attributeManager.php file to farsi.  

 

hope that helps.

thank you

The problem was solved

Have a nice day

Link to comment
Share on other sites

  • 2 months later...

I do not know why

Manually, but can not work with options Products

view this error

 

1136 - Column count doesn't match value count at row 1
insert into products_attributes values (null, '132', '1', '2', '0', '+')

Link to comment
Share on other sites

I do not know why

Manually, but can not work with options Products

view this error

 

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

insert into products_attributes values (null, '132', '1', '2', '0', '+')

 

The reason you have this error using the standard osCommerce Products Attribute is because Attribute Manager will install database fields if the sort order is enabled.  You will need to adapt and install the contribution it is based on. See this contribution: Product Attributes Sort Order v1.0 http://addons.oscommerce.com/info/1822

 

also see the  "Additonal Notes for other contribution compatability" section of this Attributes Manager documentation about the sort order contribution.

 

Since that contribution is for 2.2, you will need to adapt the installation to 2.3.4.

Link to comment
Share on other sites

Hello

i use ver 2.3.4

It worked fine attribute manager

I do not know why all of a sudden shut down

can not see the new attribute manager below the price

How do I find a bug?

 

thankyou

 

You should look at your error_log on the server in the admin folder for more information on this problem. If you are getting an error posted to the log when accessing the product edit page, please post this information for further help.

Link to comment
Share on other sites

The reason you have this error using the standard osCommerce Products Attribute is because Attribute Manager will install database fields if the sort order is enabled.  You will need to adapt and install the contribution it is based on. See this contribution: Product Attributes Sort Order v1.0 http://addons.oscommerce.com/info/1822

 

also see the  "Additonal Notes for other contribution compatability" section of this Attributes Manager documentation about the sort order contribution.

 

Since that contribution is for 2.2, you will need to adapt the installation to 2.3.4.

Hello

all steps done

but

I do not know why

can not see the new attribute manager below the price

and

Manually, but can not work with options Products

view this error

 

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

insert into products_attributes values (null, '132', '1', '2', '0', '+')

 

please help thankyou

Link to comment
Share on other sites

Manually, but can not work with options Products

view this error

 

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

insert into products_attributes values (null, '132', '1', '2', '0', '+')

 

 

you are getting this error because you have not completed integrating the Sort Order contribution: Product Attributes Sort Order v1.0 http://addons.oscommerce.com/info/1822

Link to comment
Share on other sites

 

I do not know why

can not see the new attribute manager below the price

 

 

The only way I can help you with this is if you can find an error from your error_log in /admin/error_log or in /admin/attributeManager/error_log that will help point me to the problem.

One other possibility is a javascript error you may find from FireBug debugger in FireFox browser.

Link to comment
Share on other sites

you are getting this error because you have not completed integrating the Sort Order contribution: Product Attributes Sort Order v1.0 http://addons.oscommerce.com/info/1822

Hello

Thank you for answer

When install   Product Attributes Sort Order v1.0

This file product_info.php

=============================

<?php

    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

    $products_attributes = tep_db_fetch_array($products_attributes_query);

    if ($products_attributes['total'] > 0) {

?>

 

    <p><?php echo TEXT_PRODUCT_OPTIONS; ?></p>

 

    <p>

<?php

      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");

      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {

        $products_options_array = array();

        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

        while ($products_options = tep_db_fetch_array($products_options_query)) {

          $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);

          if ($products_options['options_values_price'] != '0') {

            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

          }

        }

 

        if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {

          $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];

        } else {

          $selected_attribute = false;

        }

?>

      <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?><br />

<?php

      }

?>

    </p>

 

<?php

    }

?>

===============================

Removed and Replaced with

==============================

              <?php

}

//++++ QT Pro: End Changed Code

    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

    $products_attributes = tep_db_fetch_array($products_attributes_query);

    if ($products_attributes['total'] > 0) {

//++++ QT Pro: Begin Changed code

      $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']);

      require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');

      $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;

      $pad = new $class($products_id);

      echo $pad->draw();

    }

 

//Display a table with which attributecombinations is on stock to the customer?

if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require(DIR_WS_MODULES . "qtpro_stock_table.php"); endif;

 

//++++ QT Pro: End Changed Code

?>

 

===========================

But in Installation AJAX Attribute Manager

A part that must be changed before it is deleted

================================

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {        $products_options_array = array();        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values

=============================

I do not know why?

Link to comment
Share on other sites

Something going ar*** up here attribute manager is a simple admin install ???

 

Where on earth is the QT Pro stuff coming from unless you want to intregate!!

 

Regards

Joli

Edited by joli1811
To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Something going ar*** up here attribute manager is a simple admin install ???

 

Where on earth is the QT Pro stuff coming from unless you want to intregate!!

 

Regards

Joli

 

Hello

Thank you for answer

I did not you mean

My English is not good

Link to comment
Share on other sites

:)

 

does not matter good or bad english

 

what are you doing ?

 

ajax attribute manager does not need QT Pro or product sort order to function so following the past conversation

 

is to me very  confusing !!

 

It is a catalog/admin/...   install with just a few modifacations to enable the adjusting of options on the admin product page when updating so

 

I am lost now with all this QT Pro or product sort order stuff in the last few posts have I missed something??

 

Regards

Joli

Edited by joli1811
To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

@@joli1811- that was helpful  :rolleyes:   he obviously added QT Pro, which changed the products_info.php file, and was confused about where to make changes for the Product Attributes Sort Order v1.0 contribution.

 

@@bkiani - Don't worry about changes in the product_info.php file if you wish to fix your error in the admin.  If you want to fix the error you are getting, the changes you need to get right for Product Attributes Sort Order v1.0 are in the /admin/products_attributes.php file.  focus on those changes to fix the error when adding attributes from Products Attribute

Link to comment
Share on other sites

Hi Todd,

 

Well seem to be spending more of my time now wearing bifocals  and remembering where I left my keys

 

just lost the plot a bit there with the last few posts hahah thought it was me

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

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' )?>
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...