Jump to content
Sign in to follow this  
joeyjgarcia

Attribute Sets Contribution

Recommended Posts

Love the update to the Attributes sets. But one little thing needs to be fixed. When you are adding the sets to a product, the cPath is not getting passed over. And I kept getting carried back to the top of the product categories. I changed mine to fix this.

 

In products_attributes_sets_edit.php:

 

 echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$cPath) . '">

 

Changed to:

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">

 

Then:

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$_GET['cPath'] . '&pID='.$_GET['products_id']) . '&action=new_product' . '">

 

Changed to:

 

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$cPath . '&pID='.$_GET['products_id']) . '&action=new_product' . '">

 

Next:

<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath='.$_GET['cPath']); ?>

 

Changed to:

<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath=' . $cPath); ?>

 

Also in categories.php in the added code for this mod:

echo tep_draw_separator('pixel_trans.gif', '30', '1').'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$pID) . '" >'. tep_image_button('button_add_as.gif','[Click To Add And A.S.]' )  .'</a>';

 

Changed to:

echo tep_draw_separator('pixel_trans.gif', '30', '1').  '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$pID.'&cPath=' . $cPath) .'" >'. tep_image_button('button_add_as.gif','[Click To Add And A.S.]' )  .'</a>';


CJ Marley

WebGoddess

http://www.onlinewebgoddess.com/

Share this post


Link to post
Share on other sites

Version 5 fixed the register globals off issue. Thank you so much for helping me on this.

 

-Ryan

 

 

Joey,

Its a pleasure Joey - argue your side without worry of offense  :thumbsup:

Your points:

1.

I've putting it off, but I'll make it handle registered globals set to "off".  Shoot, just when you think you're done something else creeps up.  [heavy sigh!]

....cheer up, it'll be a piece of cake for you Joey - its not far off anyway, only two or three vars (max) are misbehaving!

 

2. To $HTTP or not to $HTTP

 

Regarding $HTTP_????_VARS or $_???? you are correct that your code will run with the former (I think, and on the assumption you explicitly use as previously discussed) and register_globals off, however it is important to note (IMHO) that there are other differences between the two.

 

$HTTP_POST_VARS (otherwise known as variable arrays) is now depracated from php. In php 5, php may be configured not to allow variable arrays to reduce server overhead. Your code (as is) in that situation may not run. For the sake of a search and replace why not do it the correct way (in particular as php5 is now starting to find its way on to isp servers)?...after all it is all in the interest of good coding and good security.

 

Also, in some cases $HTTP_????_VARS variables need to be explicitly declared as global (say in a function), whereas $_???? Are autoglobal, or superglobals, so they do not need declaring as they are automatically in scope anywhere.

I have found with osC (and contributions) there are sometimes occurences of HTTP_????_VARS requiring a global declaration when register_globals is off - it is not always obvious, but you suddenly find things not working or data missing for no reason. This is why I do a search and replace and set all HTTP_????_VARS to $_???? Variables - then I have no worries as I know they are all superglobals; in scope wherever they are despite register_globals being off. There is no down side to this approach that I know of.

osC will run without this (...aha!...or will it?...well that depends....) - personally I like certainty.

 

3. Sort Order - I'll get back on this when I have a few moments spare. Essentially I am drawing your attention to the difference between the options (that we need to order) and the product attributes (which we don't - the options are ordered). The order belongs to the options, not the product, and as there are many many more attributes why create al that redundancy. I'll give example to illustrate later. (p.s. By the way, I have planned the change but not implemented yet!)

 

Just MHO's of course - folk may and will choose to do their own thing.

 

Cheers

Chris


rkoechel2004

Share this post


Link to post
Share on other sites
I changed mine to fix this....

 

 

Umm... I'm not sure that is fixed, really. If you say it works I won't argue as I have not sat and stared at your fix all evening, but at a glance I would say you should read the last couple of pages of posts on the subject of globals. I think you have even removed a $_GET or two. I suggest they should be put back in.

 

i.e. any calls to $cpath should be $_GET['cpath']

 

I suspect that is the root of your problem - I seem ro remember fixing this too - sorry Joey this one of the misbehaving vars that slipped through my notation net.

 

Well spotted CJ!

 

ps - this is my lines 68 - 72 of product_attributes_sets_edit.php which works very well.

echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$_GET['cPath']) . '"><font color=blue style="font-family: Verdana, Arial, sans-serif; font-size: 12px;font-weight: bold;text-decoration: underline;">[Return To Catalog]</font></a>     ';

echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$_GET['cPath'] . '&pID='.$_GET['products_id']) . '&action=new_product' . '"><font color=blue style="font-family: Verdana, Arial, sans-serif; font-size: 12px;font-weight: bold;text-decoration: underline;">[Edit This Product]</font></a>';

Edited by toasty

Share this post


Link to post
Share on other sites
..... but HTTP_POST_VAR is all over osCommerce......

 

Its not if you do the global search and replace on every file B) - Dreamweaver does this very nicely - So register_globals contrib + search and replace = problems solved in one hit.

Share this post


Link to post
Share on other sites

I lied....I can now insert, edit and delete attribute sets with no problem. But on categories.php nothing related to attribute sets shows up. There is a gap between manufacturer and products name but no drop down menu. I have checked the code many times and it matches exactly what is in the install instructions. Any ideas?

 

 

 

Version 5 fixed the register globals off issue.  Thank you so much for helping me on this.

 

-Ryan


rkoechel2004

Share this post


Link to post
Share on other sites

Also, when i update a product the name of the product goes blank

 

I lied....I can now insert, edit and delete attribute sets with no problem.  But on categories.php nothing related to attribute sets shows up.  There is a gap between manufacturer and products name but no drop down menu.  I have checked the code many times and it matches exactly what is in the install instructions.  Any ideas?


rkoechel2004

Share this post


Link to post
Share on other sites

OK...i got everything back in order and working except the field to select attribute sets is still not showing up. below is that section of code from categories.php any ideas?

 

<tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td>
         </tr>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>

<!-- //JJG building list of Attribute Sets Used - Begin -->

<?php


if( empty($pInfo->products_id) ){

    $iteration = 0;

}else{

           $getOptionsCount_query = tep_db_query('SELECT count(
           DISTINCT  products_attributes_sets_id ) as count
           FROM  '. TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS .'
           WHERE  `products_id`  ='.$pInfo->products_id);


    $arr_getOptionsCount = tep_db_fetch_array($getOptionsCount_query);

    $arr_pas_id = jjg_db_getAttributeSetId($pInfo->products_id);
    if( !empty($arr_pas_id) ){

        $iteration = $arr_getOptionsCount['count'];

    }
}

for($i=0; $i <= $iteration; $i++){
?>
         <tr>
           <td class="main">
           <?php
          	 if( isset($pID) ){
                   if( $i == $iteration  ){
                 echo "Add An " . TEXT_PRODUCTS_ATTRIBUTES_SET;
                   }else{
                 echo "Using " . TEXT_PRODUCTS_ATTRIBUTES_SET;
                   }
          	 }

           ?>
           </td>
           <td class="main">
          	 <?php
          	 if( isset($pID) ){
             if( $i == $iteration ){
            	 echo tep_draw_separator('pixel_trans.gif', '30', '1').
                       '<a href="' . tep_href_link(
                       FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$pID) .
                       '" >'. tep_image_button('button_add_as.gif',
                       '[Click To Add And A.S.]' )  .'</a>';
             }else{
            	 echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ';
            	 echo $attribute_sets_names_array[$arr_pas_id[$i]];
            	 echo tep_draw_separator('pixel_trans.gif', '24', '15');
            	 echo tep_draw_checkbox_field('remove_products_attributes_sets_id_'.$i);
            	 echo "<font size=-3>(Remove Set)</font>";
            	 echo tep_draw_hidden_field('products_attributes_sets_id_'.$i,
                       $arr_pas_id[$i]);
             }
               }
           ?>

           </td>
         </tr>
<?php
}
?>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>
           <?php echo tep_draw_hidden_field('AttributeSetCount', $arr_getOptionsCount['count']+1); ?>
           </td>
         </tr>
<!-- //JJG building list of Attribute Sets Used - End -->
<?php
   for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
         <tr>
           <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
           <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? $products_name[$languages[$i]['id']] : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>
         </tr>
<?php
   }
?>

 

 

 

Also, when i update a product the name of the product goes blank


rkoechel2004

Share this post


Link to post
Share on other sites
Umm... I'm not sure that is fixed, really. If you say it works I won't argue as I have not sat and stared at your fix all evening, but at a glance I would say you should read the last couple of pages of posts on the subject of globals. I think you have even removed a  $_GET or two. I suggest they should be put back in.

 

i.e. any calls to $cpath should be $_GET['cpath']

 

I suspect that is the root of your problem - I seem ro remember fixing this too - sorry Joey this one of the misbehaving vars that slipped through my notation net.

 

Well spotted CJ!

 

Ah well regardless, the removal of the GETS as well as adding cPath to a few places it was needed fixed my issue. With the changes I have no problems left and all is working well.


CJ Marley

WebGoddess

http://www.onlinewebgoddess.com/

Share this post


Link to post
Share on other sites

FYI-

 

I did a search and replace of $HTTP_GET_VARS to $_POST

there were 1024 instances of $HTTP_GET_VARS in my installation

 

With $HTTP_GET_VARS to $_GET there were 1328 instances

 

Hence not a change to do manually, thanks for the tip toasty


rkoechel2004

Share this post


Link to post
Share on other sites
i.e. any calls to $cpath should be $_GET['cpath']

 

 

Correction.

On closer inspection this is dealt with in the application top file:

// calculate category path
 if (isset($_GET['cPath'])) {
   $cPath = $_GET['cPath'];
 } else {
   $cPath = '';
 }

..............so $_GET is not required (although its doesn't hurt in this case).

 

C.

Share this post


Link to post
Share on other sites

If that is the problem, then you fixed it correctly!! I'll upload a fix (5.01) this week.

 

Again, it is a register_globals="off" issue.

 

Nice catch, and thanks for being understanding ... I hate testing.

 

Joey

 

Love the update to the Attributes sets.  But one little thing needs to be fixed. When you are adding the sets to a product, the cPath is not getting passed over. And I kept getting carried back to the top of the product categories.  I changed mine to fix this.

 

In products_attributes_sets_edit.php:

 

 echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$cPath) . '">

 

Changed to:

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">

 

Then:

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$_GET['cPath'] . '&pID='.$_GET['products_id']) . '&action=new_product' . '">

 

Changed to:

 

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$cPath . '&pID='.$_GET['products_id']) . '&action=new_product' . '">

 

Next:

<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath='.$_GET['cPath']); ?>

 

Changed to:

<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath=' . $cPath); ?>

 

Also in categories.php in the added code for this mod:

echo tep_draw_separator('pixel_trans.gif', '30', '1').'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$pID) . '" >'. tep_image_button('button_add_as.gif','[Click To Add And A.S.]' )  .'</a>';

 

Changed to:

echo tep_draw_separator('pixel_trans.gif', '30', '1').  '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$pID.'&cPath=' . $cPath) .'" >'. tep_image_button('button_add_as.gif','[Click To Add And A.S.]' )  .'</a>';

Share this post


Link to post
Share on other sites

I missed a couple of spots, but I'll upload a fix quickly. See my last reply, cj fixed it correctly.

 

Joey

 

Version 5 fixed the register globals off issue.  Thank you so much for helping me on this.

 

-Ryan

Share this post


Link to post
Share on other sites

BIG NO NO!!!!!!!!!!

 

You don't want to replace $HTTP_GET_VARS with $_POST

 

rather you want to replace $HTTP_GET_VARS with $_GET!!!!!

 

Get variables come from the address bar, i.e. URLs

 

Post variables usually come from forms.

 

I hope you have a back up!

 

1024 instances is way too much!!!

 

I would only use a replace all feature in my new pages, not in the categories.php because you are changing osC code that worked.

 

Sorry.

 

Joey

 

 

 

 

 

FYI-

 

I did a search and replace of $HTTP_GET_VARS to $_POST

there were 1024 instances of $HTTP_GET_VARS in my installation

 

With $HTTP_GET_VARS to $_GET there were 1328 instances

 

Hence not a change to do manually, thanks for the tip toasty

Share this post


Link to post
Share on other sites
BIG NO NO!!!!!!!!!!

 

You don't want to replace $HTTP_GET_VARS with $_POST

 

rather you want to replace $HTTP_GET_VARS with $_GET!!!!!

 

Get variables come from the address bar, i.e. URLs

 

Post variables usually come from forms.

 

I hope you have a back up!

 

1024 instances is way too much!!!

 

I would only use a replace all feature in my new pages, not in the categories.php because you are changing osC code that worked.

 

Sorry.

 

Joey

Share this post


Link to post
Share on other sites
BIG NO NO!!!!!!!!!!

 

You don't want to replace $HTTP_GET_VARS with $_POST

 

rather you want to replace $HTTP_GET_VARS with $_GET!!!!!

 

Get variables come from the address bar, i.e. URLs

 

Post variables usually come from forms.

 

I hope you have a back up!

 

1024 instances is way too much!!!

 

I would only use a replace all feature in my new pages, not in the categories.php because you are changing osC code that worked.

 

Sorry.

 

Joey

BIG NO NO!!!!!!!!!!

 

You don't want to replace $HTTP_GET_VARS with $_POST

 

rather you want to replace $HTTP_GET_VARS with $_GET!!!!!

 

Get variables come from the address bar, i.e. URLs

 

Post variables usually come from forms.

 

I hope you have a back up!

 

1024 instances is way too much!!!

 

I would only use a replace all feature in my new pages, not in the categories.php because you are changing osC code that worked.

 

Sorry.

 

Joey

 

Ooops! :-"

I should point out to anyone that read my earlier posts that (as Joey has noted) osC works without a global search and replace and it is a HIGHLY RISKY PROCEDURE - If you are not sure what you are up to (or are not used to doing such things) - then DO NOT DO IT !! ...and if you do then don't do it on a live shop!

I'd hate to be responsible for any disasters!

Chris.

Share this post


Link to post
Share on other sites

That was obviously a typo on my part with get and post

 

Ooops!  :-"

I should point out to anyone that read my earlier posts that (as Joey has noted) osC works without a global search and replace and it is a HIGHLY RISKY PROCEDURE - If you are not sure what you are up to (or are not used to doing such things)  - then DO NOT DO IT !! ...and if you do then don't do it on a live shop!

I'd hate to be responsible for any disasters!

Chris.


rkoechel2004

Share this post


Link to post
Share on other sites

can some one teach me how to create the two table in my database. i am host my web on a web space, i can see my database through my account. please teach me i am a newbie...

Share this post


Link to post
Share on other sites

I know this is a crazy way to do this, but I just don't see the problem areas you see?

 

Here is the majority of the code in the page you specifically named, you tell me if you see any problem variables.

 

<?php
 if( $_GET['action'] == 'save' ){

   $arr_attributeSetIDs = array();
   for($i=0; $i<$asRowCount; $i++){
       if( isset($HTTP_POST_VARS['attSetId_'.$i]) ){
           $arr_attributeSetIDs[] = $HTTP_POST_VARS['attSetId_'.$i];
       }
   }

   jjg_db_attributeSets($arr_attributeSetIDs, $_GET['products_id'], "update_product");

echo '<div align=center style="font-family: Verdana, Arial, sans-serif; font-size: 16px;font-weight: bold;"><font color=green>Product Update Successful</font></div>';

echo '<div align=center ><br><br>';

echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$_GET['cPath']) . '"><font color=blue style="font-family: Verdana, Arial, sans-serif; font-size: 12px;font-weight: bold;text-decoration: underline;">[Return To Catalog]</font></a>     ';

echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$_GET['cPath'] . '&pID='.$_GET['products_id']) . '&action=new_product' . '"><font color=blue style="font-family: Verdana, Arial, sans-serif; font-size: 12px;font-weight: bold;text-decoration: underline;">[Edit This Product]</font></a>';

echo '</div>';
?>

 

and

 

  $arrPAS_IDs = jjg_db_getAttributeSetId($_GET['pID']);



   $product_info_sql = "SELECT * FROM " . TABLE_PRODUCTS_DESCRIPTION . "
   where products_id=".$_GET['pID'];
   $product_info_query = tep_db_query($product_info_sql);
   $product_info = tep_db_fetch_array($product_info_query);


   $attributeSetsNames_query = tep_db_query("select products_attributes_sets_id, products_attributes_sets_name  from " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " where 1 order by products_attributes_sets_name");
?>
<tr><td>
<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath='.$_GET['cPath']); ?>
<table border="0" width="80%" cellspacing="0" cellpadding="1">
<tr><td colspan="3" align=right>

      	 <?php echo tep_image_submit('button_save.gif', ' save '); ?>

 

If this looks clean then I'll post a new version.

 

Thanks.

 

Joey

 

 

 

 

 

Love the update to the Attributes sets.  But one little thing needs to be fixed. When you are adding the sets to a product, the cPath is not getting passed over. And I kept getting carried back to the top of the product categories.  I changed mine to fix this.

 

In products_attributes_sets_edit.php:

 

 echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$cPath) . '">

 

Changed to:

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">

 

Then:

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$_GET['cPath'] . '&pID='.$_GET['products_id']) . '&action=new_product' . '">

 

Changed to:

 

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' .
$cPath . '&pID='.$_GET['products_id']) . '&action=new_product' . '">

 

Next:

<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath='.$_GET['cPath']); ?>

 

Changed to:

<?php echo tep_draw_form("asEditForm",FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT,'action=save&products_id='.$_GET['pID'].'&cPath=' . $cPath); ?>

 

Also in categories.php in the added code for this mod:

echo tep_draw_separator('pixel_trans.gif', '30', '1').'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$pID) . '" >'. tep_image_button('button_add_as.gif','[Click To Add And A.S.]' )  .'</a>';

 

Changed to:

echo tep_draw_separator('pixel_trans.gif', '30', '1').  '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$pID.'&cPath=' . $cPath) .'" >'. tep_image_button('button_add_as.gif','[Click To Add And A.S.]' )  .'</a>';

Share this post


Link to post
Share on other sites

Greetings folks.

I love the idea of this contribution, I just want to get it to work... :blink:

 

This is a fresh install on V 2.2

I followed the dirs to the letter, heading all warnings and cut paste the code manually not with find/replace.

 

The SQL upload was successfull, i see the tables and the modified one.

I even droped them and re installed them but getting the same error.

 

This happens when in admin and click the "attributes sets" in the "catalog"

Attribute Sets

 

1146 - Table 'mysql39301ecf41b2eb8431be7d2c2e7.table_products_attributes_sets' doesn't exist

 

select products_attributes_sets_id, products_attributes_sets_name from TABLE_PRODUCTS_ATTRIBUTES_SETS where 1 order by products_attributes_sets_name

 

[TEP STOP]

 

Running:

phpMyAdmin 2.5.3-rc2

MySQL 4.0.20a-nt

 

This version of os commerce was installed by plesk 7.03 windows 2003 server.

 

Any ideas?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Sometimes you just miss something even when you are sure to didn't. I do it all the time - it's a humbling discovery.

 

It looks like your table name is not translating correctly.

 

Not sure where you are talking about because "catalog" could mean anything.

 

I have found a couple of instances that you could be referring to.

 

products_attributes_sets.php(539): $attributeSetsNames_query = tep_db_query("select products_attributes_sets_id, products_attributes_sets_name  from " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " where 1 order by products_attributes_sets_name");

 

or

 

products_attributes_sets_edit.php(97): $attributeSetsNames_query = tep_db_query("select products_attributes_sets_id, products_attributes_sets_name  from " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " where 1 order by products_attributes_sets_name");

 

Both use the constant variable "TABLE_PRODUCTS_ATTRIBUTES_SETS" and since your error is displaying it the way I see it below, it could mean that you haven't put the "define" statement in the database tables file like this:

 

See install.txt(189): define('TABLE_PRODUCTS_ATTRIBUTES_SETS', 'products_attributes_sets');

 

That line should translate your constant variable (TABLE_PRODUCTS_ATTRIBUTES_SETS)to the real name (products_attributes_sets).

 

or

 

Double check that this line:

 

products_attributes_sets.php(539): $attributeSetsNames_query = tep_db_query("select products_attributes_sets_id, products_attributes_sets_name  from " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " where 1 order by products_attributes_sets_name");

 

doesn't look like this:

 

products_attributes_sets.php(539): $attributeSetsNames_query = tep_db_query("select products_attributes_sets_id, products_attributes_sets_name  from TABLE_PRODUCTS_ATTRIBUTES_SETS  where 1 order by products_attributes_sets_name");

 

That would give you the same error.

 

Good Luck.

 

Joey

 

Greetings folks.

I love the idea of this contribution, I just want to get it to work... :blink:

 

This is a fresh install on V 2.2

I followed the dirs to the letter, heading all warnings and cut paste the code manually not with find/replace.

 

The SQL upload was successfull, i see the tables and the modified one.

I even droped them and re installed them but getting the same error.

 

This happens when in admin and click the "attributes sets" in the "catalog"

Attribute Sets 

 

1146 - Table 'mysql39301ecf41b2eb8431be7d2c2e7.table_products_attributes_sets' doesn't exist

 

select products_attributes_sets_id, products_attributes_sets_name from TABLE_PRODUCTS_ATTRIBUTES_SETS where 1 order by products_attributes_sets_name

 

[TEP STOP]

 

Running:

phpMyAdmin 2.5.3-rc2

MySQL 4.0.20a-nt

 

This version of os commerce was installed by plesk 7.03 windows 2003 server.

 

Any ideas?

 

Thanks in advance

Share this post


Link to post
Share on other sites

I installed version 5.1 and have checked my installation about 10 times, here is what my screen shows when editing a product. Notice that the box to select product attributes does not show up. Any thoughts?

 

screenshot.jpg

 

 

Since there was no comments on my previous post on any more errors, I posted version 5.1.

 

Joey


rkoechel2004

Share this post


Link to post
Share on other sites

It cannot show up when you are adding a new product because there is no product_id to attach the Attribute Set to yet. Once you've added a product then edit it again and you should see the Add A.S. button or, after you add your product you can see a little round button that has an "A S" next to your product in the Categories/Products list, click on that to add your attribute sets.

 

Joey

 

 

I installed version 5.1 and have checked my installation about 10 times, here is what my screen shows when editing a product.  Notice that the box to select product attributes does not show up.  Any thoughts?

 

screenshot.jpg

Share this post


Link to post
Share on other sites

This install is taking forever, i have a new install of OSCommerce, isnt there a release which includes all the modified files?

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
Sign in to follow this  

×