Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wolfen Featured Sets SUPPORT


241

Recommended Posts

Hi ,

 

I just install the contrib & OSC2.2 , the system have a error,

 

1064 - You have an error in your SQL syntax near '.products_featured from products p, products_description pd, products_to_categor' at line 1

 

select distinct p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_qty_blocks, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status p.products_featured from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '7' group by p.products_id order by pd.products_name

 

[TEP STOP]

 

 

Pls Help me!!!!!!!!!!

Thanks a lot!!!!!!!!

Link to comment
Share on other sites

  • Replies 398
  • Created
  • Last Reply

Top Posters In This Topic

Hi ,

 

I just install the contrib & OSC2.2 , the system have a error,

Pls Help me!!!!!!!!!!

Thanks a lot!!!!!!!!

 

 

This looks like you have done a manual install of the codes for the contribution and have missed out a

,
after status
p.products_status p.products_featured from
should be
p.products_status, p.products_featured from

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi people,

 

I just installed the contribution.

 

In the admin section, the "featured until" date seems not to update on the database (table products), so I changed it manually.

 

Also, the date is not shown on screen when editing categories, products or manufactures.

 

And the biggest problem is that I don't see the changes on the catalog pages... I think it is because Im using a STS 2.01 template from 7dana.com :'( If this is the problem, how do I solve it?

 

This is the only contribution I have installed (and the template) and Im using MS2.

 

Any help would be aprecciated... thanks folks. :thumbsup:

Link to comment
Share on other sites

*** ANNOUNCEMENT ***

 

Too fix any issues with not being able to update the featured until date in the database and also to give a representation of the featured until date when editing make the following code changes.

 

******************************************************
******************************************************

*** admin/categories.php ***

*** locate code ***

     case 'update_product':
       if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {
         $action = 'new_product';
       } else {
         if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);
         $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);

         $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';

         $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
                                 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
                                 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
                                 'products_date_available' => $products_date_available,
                                 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
                                 'products_featured' => tep_db_prepare_input($HTTP_POST_VARS['products_featured']),
                                 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
                                 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
                                 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));


*** change code to ***

     case 'update_product':
       if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {
         $action = 'new_product';
       } else {
         if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);
         $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);

         $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';

         $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
                                 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
                                 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
                                 'products_date_available' => $products_date_available,
                                 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
                                 'products_featured' => tep_db_prepare_input($HTTP_POST_VARS['products_featured']),
     'products_featured_until' => tep_db_prepare_input($HTTP_POST_VARS['products_featured_until']),
                                 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
                                 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
                                 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));


*** locate code ***

         } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {
           $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, products_featured, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
           $product = tep_db_fetch_array($product_query);
           tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_featured, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_featured'] . "', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
           $dup_products_id = tep_db_insert_id();
           $description_query = tep_db_query("select language_id, products_name, products_description, products_short, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'");
           while ($description = tep_db_fetch_array($description_query)) {
             tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_short, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_short']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
           }

*** change code to ***

         } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {
           $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, products_featured, products_featured_until, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
           $product = tep_db_fetch_array($product_query);
           tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_featured, products_featured_until, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_featured'] . "', '" . (int)$product['products_featured_until'] . "', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
           $dup_products_id = tep_db_insert_id();
           $description_query = tep_db_query("select language_id, products_name, products_description, products_short, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'");
           while ($description = tep_db_fetch_array($description_query)) {
             tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_short, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_short']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
           }


*** locate code ***

<?php
 if ($action == 'new_product') {
   $parameters = array('products_name' => '',
                      'products_short' => '',
                      'products_description' => '',
                      'products_url' => '',
                      'products_id' => '',
                      'products_quantity' => '',
                      'products_model' => '',
                      'products_image' => '',
                      'products_price' => '',
                      'products_weight' => '',
                      'products_date_added' => '',
                      'products_last_modified' => '',
                      'products_date_available' => '',
                      'products_featured' => '',
                      'products_status' => '',
                      'products_tax_class_id' => '',
                      'manufacturers_id' => '');

   $pInfo = new objectInfo($parameters);

   if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
     $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_short, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_featured, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
     $product = tep_db_fetch_array($product_query);

     $pInfo->objectInfo($product);
   } elseif (tep_not_null($HTTP_POST_VARS)) {
     $pInfo->objectInfo($HTTP_POST_VARS);
     $products_name = $HTTP_POST_VARS['products_name'];
     $products_short = $HTTP_POST_VARS['products_short'];
     $products_description = $HTTP_POST_VARS['products_description'];
     $products_url = $HTTP_POST_VARS['products_url'];
   }

*** change code to ***

<?php
 if ($action == 'new_product') {
   $parameters = array('products_name' => '',
                      'products_short' => '',
                      'products_description' => '',
                      'products_url' => '',
                      'products_id' => '',
                      'products_quantity' => '',
                      'products_model' => '',
                      'products_image' => '',
                      'products_price' => '',
                      'products_weight' => '',
                      'products_date_added' => '',
                      'products_last_modified' => '',
                      'products_date_available' => '',
                      'products_featured' => '',
                      'products_featured_until' => '',
                      'products_status' => '',
                      'products_tax_class_id' => '',
                      'manufacturers_id' => '');

   $pInfo = new objectInfo($parameters);

   if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
     $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_short, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_featured, p.products_featured_until, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
     $product = tep_db_fetch_array($product_query);

     $pInfo->objectInfo($product);
   } elseif (tep_not_null($HTTP_POST_VARS)) {
     $pInfo->objectInfo($HTTP_POST_VARS);
     $products_name = $HTTP_POST_VARS['products_name'];
     $products_short = $HTTP_POST_VARS['products_short'];
     $products_description = $HTTP_POST_VARS['products_description'];
     $products_url = $HTTP_POST_VARS['products_url'];
     $products_featured = $HTTP_POST_VARS['products_featured'];
     $products_featured_until = $HTTP_POST_VARS['products_featured_until'];
   }


*** locate code ***

   $products_count = 0;
   if (isset($HTTP_GET_VARS['search'])) {
     $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_featured, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
   } else {
     $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_featured_until from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
   }
   while ($products = tep_db_fetch_array($products_query)) {
     $products_count++;
     $rows++;

*** change code to ***

   $products_count = 0;
   if (isset($HTTP_GET_VARS['search'])) {
     $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_featured, p.products_featured_until, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
   } else {
     $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_featured, p.products_featured_until from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
   }
   while ($products = tep_db_fetch_array($products_query)) {
     $products_count++;
     $rows++;

*** locate code ***

     case 'new_category':
       $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_CATEGORY . '</b>');

       $contents = array('form' => tep_draw_form('newcategory', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"'));
       $contents[] = array('text' => TEXT_NEW_CATEGORY_INTRO);

       $category_inputs_string = '';
       $languages = tep_get_languages();
       for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']');
       }

       $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_NAME . $category_inputs_string);
       $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));
$contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED . '<br>' . tep_draw_radio_field('categories_featured', '1', $in_fc_status) . ' ' . TEXT_CATEGORIES_YES . ' ' . tep_draw_radio_field('categories_featured', '0', $out_fc_status) . ' ' . TEXT_CATEGORIES_NO);
$contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br><script language="javascript">CategoriesFeaturedUntil.writeControl(); CategoriesFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
       $contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', '', 'size="2"'));
       $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
       break;
     case 'edit_category':
       $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>');

       $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('categories_id', $cInfo->categories_id));
       $contents[] = array('text' => TEXT_EDIT_INTRO);

       $category_inputs_string = '';
       $languages = tep_get_languages();
       for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id']));
       }

       $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);
       $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->categories_image, $cInfo->categories_name) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->categories_image . '</b>');
       $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));
$contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED . '<br>' . tep_draw_radio_field('categories_featured', '1', $in_fc_status) . ' ' . TEXT_CATEGORIES_YES . ' ' . tep_draw_radio_field('categories_featured', '0', $out_fc_status) . ' ' . TEXT_CATEGORIES_NO);
$contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br><script language="javascript">CategoriesEditFeaturedUntil.writeControl(); CategoriesEditFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
       $contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'));
       $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
       break;

*** change code to ***

     case 'new_category':
       $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_CATEGORY . '</b>');

       $contents = array('form' => tep_draw_form('newcategory', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"'));
       $contents[] = array('text' => TEXT_NEW_CATEGORY_INTRO);

       $category_inputs_string = '';
       $languages = tep_get_languages();
       for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']');
       }

       $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_NAME . $category_inputs_string);
       $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));
 $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED . '<br>' . tep_draw_radio_field('categories_featured', '1', $in_fc_status) . ' ' . TEXT_CATEGORIES_YES . ' ' . tep_draw_radio_field('categories_featured', '0', $out_fc_status) . ' ' . TEXT_CATEGORIES_NO);
 $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br>' . $cInfo->categories_featured_until . '<br><script language="javascript">CategoriesFeaturedUntil.writeControl(); CategoriesFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
       $contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', '', 'size="2"'));
       $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
       break;
     case 'edit_category':
       $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>');

       $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('categories_id', $cInfo->categories_id));
       $contents[] = array('text' => TEXT_EDIT_INTRO);

       $category_inputs_string = '';
       $languages = tep_get_languages();
       for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id']));
       }

       $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);
       $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->categories_image, $cInfo->categories_name) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->categories_image . '</b>');
       $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));
 $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED . '<br>' . tep_draw_radio_field('categories_featured', '1', $in_fc_status) . ' ' . TEXT_CATEGORIES_YES . ' ' . tep_draw_radio_field('categories_featured', '0', $out_fc_status) . ' ' . TEXT_CATEGORIES_NO);
 $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br>' . $cInfo->categories_featured_until . '<br><script language="javascript">CategoriesEditFeaturedUntil.writeControl(); CategoriesEditFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
       $contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'));
       $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
       break;


*** close file and save admin/categories.php ***

******************************************************
******************************************************

******************************************************
******************************************************

*** open file admin/manufacturers.php ***

*** locate code ***

 switch ($action) {
   case 'new':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_NEW_MANUFACTURER . '</b>');

     $contents = array('form' => tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'action=insert', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_NEW_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name'));
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_IMAGE . '<br>' . tep_draw_file_field('manufacturers_image'));
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED . '<br>' . tep_draw_radio_field('manufacturers_featured', '1', $in_fms_status) . ' ' . TEXT_MANUFACTURERS_YES . ' ' . tep_draw_radio_field('manufacturers_featured', '0', $out_fms_status) . ' ' . TEXT_MANUFACTURERS_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br><script language="javascript">ManufacturersFeaturedUntil.writeControl(); ManufacturersFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED . '<br>' . tep_draw_radio_field('manufacturer_featured', '1', $in_fm_status) . ' ' . TEXT_MANUFACTURER_YES . ' ' . tep_draw_radio_field('manufacturer_featured', '0', $out_fm_status) . ' ' . TEXT_MANUFACTURER_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br><script language="javascript">ManufacturerFeaturedUntil.writeControl(); ManufacturerFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');

*** change code to ***

 switch ($action) {
   case 'new':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_NEW_MANUFACTURER . '</b>');

     $contents = array('form' => tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'action=insert', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_NEW_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name'));
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_IMAGE . '<br>' . tep_draw_file_field('manufacturers_image'));
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED . '<br>' . tep_draw_radio_field('manufacturers_featured', '1', $in_fms_status) . ' ' . TEXT_MANUFACTURERS_YES . ' ' . tep_draw_radio_field('manufacturers_featured', '0', $out_fms_status) . ' ' . TEXT_MANUFACTURERS_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br>' . $mInfo->manufacturers_featured_until . '<br><script language="javascript">ManufacturersFeaturedUntil.writeControl(); ManufacturersFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED . '<br>' . tep_draw_radio_field('manufacturer_featured', '1', $in_fm_status) . ' ' . TEXT_MANUFACTURER_YES . ' ' . tep_draw_radio_field('manufacturer_featured', '0', $out_fm_status) . ' ' . TEXT_MANUFACTURER_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br>' . $mInfo->manufacturer_featured_until . '<br><script language="javascript">ManufacturerFeaturedUntil.writeControl(); ManufacturerFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');

*** locate code ***

   case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_MANUFACTURER . '</b>');

     $contents = array('form' => tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $HTTP_GET_VARS['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_EDIT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name', $mInfo->manufacturers_name));
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_IMAGE . '<br>' . tep_draw_file_field('manufacturers_image') . '<br>' . $mInfo->manufacturers_image);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED . '<br>' . tep_draw_radio_field('manufacturers_featured', '1', $in_fms_status) . ' ' . TEXT_MANUFACTURERS_YES . ' ' . tep_draw_radio_field('manufacturers_featured', '0', $out_fms_status) . ' ' . TEXT_MANUFACTURERS_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br><script language="javascript">ManufacturersFeaturedUntil.writeControl(); ManufacturersFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED . '<br>' . tep_draw_radio_field('manufacturer_featured', '1', $in_fm_status) . ' ' . TEXT_MANUFACTURER_YES . ' ' . tep_draw_radio_field('manufacturer_featured', '0', $out_fm_status) . ' ' . TEXT_MANUFACTURER_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br><script language="javascript">ManufacturerFeaturedUntil.writeControl(); ManufacturerFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');

*** change code to ***

   case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_MANUFACTURER . '</b>');

     $contents = array('form' => tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $HTTP_GET_VARS['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_EDIT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name', $mInfo->manufacturers_name));
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_IMAGE . '<br>' . tep_draw_file_field('manufacturers_image') . '<br>' . $mInfo->manufacturers_image);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED . '<br>' . tep_draw_radio_field('manufacturers_featured', '1', $in_fms_status) . ' ' . TEXT_MANUFACTURERS_YES . ' ' . tep_draw_radio_field('manufacturers_featured', '0', $out_fms_status) . ' ' . TEXT_MANUFACTURERS_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br>' . $mInfo->manufacturers_featured_until . '<br><script language="javascript">ManufacturersFeaturedUntil.writeControl(); ManufacturersFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED . '<br>' . tep_draw_radio_field('manufacturer_featured', '1', $in_fm_status) . ' ' . TEXT_MANUFACTURER_YES . ' ' . tep_draw_radio_field('manufacturer_featured', '0', $out_fm_status) . ' ' . TEXT_MANUFACTURER_NO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURER_FEATURED_DATE . '<small>(YYYY-MM-DD)</small><br>' . $mInfo->manufacturer_featured_until . '<br><script language="javascript">ManufacturerFeaturedUntil.writeControl(); ManufacturerFeaturedUntil.dateFormat="yyyy-MM-dd";</script>');


*** close file and save admin/manufacturers.php ***

******************************************************
******************************************************

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Steve, now it is working fine. Admin options are fixed with you last annoucement, and I got the index page working after following the instructions I have missed in this topic. It had nothing to do with the STS template at all.

 

Now Im just changing the layout to fit my needs. Thanks for this great contributions and if I have something new that I think would be useful for everyone I will post here. :thumbsup:

Link to comment
Share on other sites

Can we have an updated package with all the bug fixes.

 

There are only the four changes from posts here in support, so no need for an update.

 

I will be releasing a new version which will have much improved features which will be announced soon.

 

Are you no longer working on cieto featured products?

Do you have any code additions for this contribution?

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi steve

Thanks for providing a full updated set - just to be clear, is v1.01 a cumulative patch containing the different fixes as posted above and in the support thread or is there anything else in v1.01 ?

 

Carine

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi steve

Thanks for providing a full updated set - just to be clear, is v1.01 a cumulative patch containing the different fixes as posted above and in the support thread or is there anything else in v1.01 ?

 

Carine

 

This is the complete replacement pack with all fixes todate.

 

I had not planned on releasing one as I am about to be releasing a completely new version soon, which will have a whole load of new features and better design control from within the admin.

 

I am yet deciding if the new version should wait until I have the css tied into the admin as well or should I release with all the features that are ready.

 

The css side just means that you can make even more changes from within the admin and the idea is to be able to change any aspect of any section from the admin side.

 

As you will understand this is a lot of work and so may or may not come to fruition.

 

Please do not post in the announcement thread as it is for announcements only, the support thread is for support and questions, thank you for your cooperation.

 

As yet there have been no suggested includes for the contribution and nobody has contacted me with possible code additions etc.

 

Await the announcement as to what is to be included in the next version, though it should have featured specials and optional side boxes for each of the featured sets as well as a more configuable design layout controlled from admin.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

As yet there have been no suggested includes for the contribution and nobody has contacted me with possible code additions etc.

I'd like all of the different layouts to get the first X words from the regular product description field if the products_short_description field is not filled out.

At the moment this isn't supported in the layout that I'm using, I was thinking of adding this myself, but if you are bringing out a new version, it might well be included and I would just be wasting time on this if I then upgrade to your latest version.

 

Thanks again for an excellent contribution !

 

Carine

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I'd like all of the different layouts to get the first X words from the regular product description field if the products_short_description field is not filled out.

At the moment this isn't supported in the layout that I'm using, I was thinking of adding this myself, but if you are bringing out a new version, it might well be included and I would just be wasting time on this if I then upgrade to your latest version.

 

Thanks again for an excellent contribution !

 

Carine

 

If this were done then there would be no need for the short description field. :D which is self defeating. The problem with grabbing a section of the main description is in that with each description being different you could end up being cut off mid sentence, it is far better to enter a dedicated made for the job short description.

 

If you want to write the codes for that then I will see about integrating it prior to the next release

 

Thank you for the input.

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

If this were done then there would be no need for the short description field. :D which is self defeating. The problem with grabbing a section of the main description is in that with each description being different you could end up being cut off mid sentence, it is far better to enter a dedicated made for the job short description.

 

Thank you for the input.

I personally like the power of both.

In the shop I think about 95% of the products have a very short description.

If it picks up the start of the description (and usually the complete text), I can easily enable the featured product without having to go into edit mode to add the short description.

Also, my easypopulate install doesn't come with a short description field.

So it's more a matter of convenience for me.

 

But I do agree with your point, providing a specific short description that is displayed in the featured section is a better feature.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I edited my post whilst you were typing and added this

 

If you want to write the codes for that then I will see about integrating it prior to the next release

 

I had tried the method that you were discussing before and was having some issues with integrating it into certain layouts so I changed the code for the layout in question to take the main description instead, just a case of replacing the short_description with description

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi,

you contrib is great but, is there a way to integrated with Total B2B.  http://www.oscommerce.com/community/contributions,2158

 

Thanks

 

Yes this is possibly however as with any other contribution being integrated into b2b code changes will be required for prices

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I Steve, another beautifull contrib!!!

 

I've 1 "problem" with this contrib.

 

I've also installed SaleMaker contrib, and I've created a test sale, the new price for the entire catalog was 1 (euro) + tax (20%) -> 1,20.

 

Only the products set up to featured don't show the sale price, but featured_categories and featured_manufacturer show the sale price.

If the featured product is special product the featured price is the price from the special setting and not the sale setting, and if the featured product is't special the price is the standard price and not the sale price.

 

I've tried to modify 2 file, featured_products.php and featured_sets.php, to make to show the correct prices like in the categories or the manufacture, but I'm not able to make this modification, can you help me?

 

Tnx, jo.

Link to comment
Share on other sites

I Steve, another beautifull contrib!!!

 

I've 1 "problem" with this contrib.

 

I've also installed SaleMaker contrib, and I've created a test sale, the new price for the entire catalog was 1 (euro) + tax (20%) -> 1,20.

 

Have you read through the support thread <_< and found nothing not even on Page 1 Post #8 :-" come on guys search the support thread before posting (w00t)

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Nice contribution - works great except for one issue:

 

When I use the Featured Category function, it shows products that are set as inactive! Which means that I get a load of products with zero price and a dead link showing up.

 

Is there a way to fix this??

 

Cheers

Link to comment
Share on other sites

are the products set as featured if products are not set as featured then they will not show, you may have missed a part of the code install, as if a products status is inactive this also sets the featured inactive for the product

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Nice contribution - works great except for one issue:

 

When I use the Featured Category function, it shows products that are set as inactive!  Which means that I get a load of products with zero price and a dead link showing up.

 

Is there a way to fix this??

 

Cheers

 

Thanks for the respose Steve

 

As far as I can see, it's been installed OK (did it twice!)

 

If I set a category to be featured, all the products in that category can been seen whether they are individually set as featured or not - even the inactive ones.

 

I'll try re-installing though, just in case!

Link to comment
Share on other sites

Thanks for the respose Steve

 

As far as I can see, it's been installed OK (did it twice!)

 

If I set a category to be featured, all the products in that category can been seen whether they are individually set as featured or not - even the inactive ones.

 

I'll try re-installing though, just in case!

 

I have not managed as yet to replicate this, however you could add this:

 

catalog/includes/modules/featured_sets.php

 

locate line#98

 

and make code this:

where c.categories_featured = '1' and p.products_status = '1' and p.products_featured = '1' and cd.language_id

 

This will force the category to only show products within the category that have the status as active and the featured as active

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I have not managed as yet to replicate this, however you could add this:

 

catalog/includes/modules/featured_sets.php

 

locate line#98

 

and make code this:

where c.categories_featured = '1' and p.products_status = '1' and p.products_featured = '1' and cd.language_id

 

This will force the category to only show products within the category that have the status as active and the featured as active

 

 

Steve

 

Thanks again - I'll give that a try on Monday

 

Cheers

 

Sean

Link to comment
Share on other sites

I have a quick question:

 

I installed, no error.. so far so good

i entered into the admin section,

I have marked a category, as well as product in side the catagory as featured, they all have the little green circle, yet I get nothin on my main page. I inserted the code into index.php as per the istructions. no "featured product" section like in the screen shots

 

any ideas ?

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