Jump to content
kymation

[Contribution] Products Specifications

Recommended Posts

The contents will not be the same unless the filter returns all products on the page. I doubt this will happen very often, if at all.

 

If you are really worried about it, you can add a noindex meta tag to the Filters page, or add rel=nofollow to the filter links, or best of all, add the filters.php to the denied list in your robots.txt. Any of those should keep the search engines out of any potential duplicate content.

 

Regards

Jim

Edited by kymation

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim,

 

You must be sick of hearing from me by now. I still seem to be having that problem with the CK Editor addon,,

I have completely started my entire website from scratch again. I have added the product specs and the CK Editor. If i create a new product and type some text into the ckeditor with formatting it displays if fine on my website until i go back to admin and open the product again. it does not seem to load the data correctly back into the ckeditor. if i then go back to the website it has change d back to the \\rn rubbish again.

 

Any suggestions beside not using the CK editor??

 

regards

 

Bret

Share this post


Link to post
Share on other sites

Sorry, I'm out of ideas.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi

after installing I have this error on produt_info

table_products_to_documents' doesn't exist

 

select count(*) as total from TABLE_PRODUCTS_TO_DOCUMENTS where products_id = '21'

 

I try with a new vanila osco 2.31 and your last package and I have the same result.

What I Have forgoten

 

Excuse my bad english

Francois

Share this post


Link to post
Share on other sites

That means you skipped the changes to catalog/includes/database_tables.php.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi

thank's for your response.

 

In YOUR last package

In catalog/includes/database_tables.php

// Start Products Specifications

define('TABLE_PRODUCTS_SPECIFICATIONS', 'products_specifications');

define('TABLE_SPECIFICATION', 'specifications');

define('TABLE_SPECIFICATION_DESCRIPTION', 'specification_description');

define('TABLE_SPECIFICATION_GROUPS', 'specification_groups');

define('TABLE_SPECIFICATIONS_FILTERS', 'specification_filters');

define('TABLE_SPECIFICATIONS_FILTERS_DESCRIPTION', 'specification_filters_description');

define('TABLE_SPECIFICATIONS_TO_CATEGORIES', 'specification_groups_to_categories');

define('TABLE_SPECIFICATIONS_VALUES', 'specification_values');

define('TABLE_SPECIFICATIONS_VALUES_DESCRIPTION', 'specification_values_description');

// End Products Specifications

 

Where is TABLE_PRODUCTS_TO_DOCUMENTS ?

 

And in products_specifications.sql, there is no about this table.

Is your last package Products Specifications 1.1.8 a full package or not ??

 

Francois

Share this post


Link to post
Share on other sites

Got the same issue Jim:

 

Fresh install of OS 2.3.1.

 

Updated DB

 

and copied your file to the letter!

 

The result: (on product page)

 

TABLE_PRODUCTS_TO_DOCUMENTS' doesn't exist

 

select count(*) as total from TABLE_PRODUCTS_TO_DOCUMENTS where products_id = '28'

 

 

PLease could you check this agin your end - something is a miss

 

Cheers

Share this post


Link to post
Share on other sites

Both of you: Log into your Admin. Click on Configuration, then Specifications. Find Show Documents Tab in the list and click on it. Click Edit, change the setting to False, then click Save.

 

Or install the Document Manager if you want to use this tab.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello Jim,

 

I just installed your contribution (v1.1.8) on a 2.3.1 version and I have some questions. I just want you to know that I'm not a guru of php but I can understand and modify pretty much contributions just to meet my needs smile.png

 

1) I would like to know how to enable javascript for filters (i use checkboxes). if it's not possible with checkboxes, let me know what kind of filter should I use

 

2) if question 1 is not possible, how can I make one single form for all the specifications.

 

Best regards,

George

 

P.S. I love this contribution. I was looking for something like this for long time.

 

P.P.S. you can check the working shop here http://www.zebraprinting.ro/index.php

Edited by goito99

Share this post


Link to post
Share on other sites

Every input type is tagged with onChange="this.form.submit();" That should work if Javascript is enabled. If it's not, you should see a submit button for each filter.

 

To use a button for all filters, you will need to remove the form around each filter type, then supply your own form around all filters, with a submit button in that form. See the tep_get_filter_string() function in catalog/includes/functions/products_specifications.php.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Working nicely! Big thanks.

 

I am having difficulty on two setups tho:

 

1. Filter by MANUFACTURERS? (how to simpy show a dropdown list of all the manufacturers)

2. Filter by COLOR? (i have colors setup in product attributes....)....Use Existing Database Field:????

 

I have setup price that work perfectly

 

 

Any guidence would be most appreciated.

 

Thanks all - esp. Jim

Share this post


Link to post
Share on other sites

1. Yes. Set up a Manufacturer filter and import the manufacturers list.

 

2. Using attributes as an existing database field is not currently possible. It's on my list of things to add. For now you'll have to add a new Specification and fill it by hand.

 

See the User's Manual for details.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thanks Jim!

 

One other question: when entering in the products specification, lets say COLOR..

 

I type in GREEN. - thats ok and the search filter for colour finds it because i have entered that in the text box during product setup..

 

Now that same product is available in 5 colors: GREEN RED BLUE YELLOW etc....

 

IS THERE A DELIMITER (; or : or...) TO BE ABLE TO ADD MORE THAN JUST ONE COLOR IN THE SPECIFICATION TEXT BOX DURING PRODUCT SETUP??

 

 

Thank you! -

 

Automatically pulling this info from the attribute would be SO SO SO very handy and simplify the whole proceedings.

 

Many thanks and i look forward to the next update.

Edited by gfasal

Share this post


Link to post
Share on other sites

Yes, look at the Multiple specification type. More information is in the User's Manual.

 

You are always welcome to help with the code. I don't have time to do half of the things I would like to.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi!

 

I want to use the accessories tab and just installed the X-sell contrubution that was linked in the instruction PDF.

 

I got a problem:

 

After installed the X-sell contribution I get this error when clicking on the accessories tab:


  • 1065 - Query was empty

(I have linked products with each other in the x-sell functuin)

 

Checked the code in products_tab.php and find that the query was out-comment in line 98 - 106.

 


<?php
// The Accessories (cross sell) tab
 if( SPECIFICATIONS_ACCESSORIES_TAB == 'True' ) {
$acc_tab = false;
/*	$check_xsell_query_raw = "
  select
	count(xp.xsell_id) as total
  from " . TABLE_PRODUCTS_XSELL . " xp,
	   " . TABLE_PRODUCTS . " p
  where xp.products_id = '" . (int) $_GET['products_id'] . "'
	and xp.xsell_id = p.products_id
	and p.products_status = '1'
  "; */
$check_xsell_query = tep_db_query($check_xsell_query_raw);
$check_xsell = tep_db_fetch_array ($check_xsell_query);
if( $check_xsell['total'] >= MIN_DISPLAY_ALSO_PURCHASED ) {
  $acc_tab = true;
?>

I removed the /* and now when i Click on the accessories tab I get this:

 

 

Warning: include_once(includes/modules/products_accessories.php ) [function.include-once]: failed to open stream: No such file or directory in C:\wamp\www\hlm\includes\modules\products_tabs.php on line 294

 

Warning: include_once() [function.include]: Failed opening 'includes/modules/products_accessories.php ' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\hlm\includes\modules\products_tabs.php on line 294

 

 

Is the products_Accessories.php missing in the contr? beacuse I dont belive its a file thats in the X-sell contribution.

Edited by mumme

Share this post


Link to post
Share on other sites

That's a bug. Two bugs if you count the commented-out code. Here's the missing file:

 

<?php
/*
 $Id: products_accessories.php, v1.0  20091013 kymation $
 $From: xsell_products.php, v1  2002/09/11 $
 $Loc: catalog/includes/modules/ $

 osCommerce, Open Source E-Commerce Solutions
 <http://www.oscommerce.com>

 Copyright (c) 2009 osCommerce

 Released under the GNU General Public License
*/


 if (SPECIFICATIONS_ACCESSORIES_TAB == 'True' && isset ($_GET['products_id']) && $_GET['products_id'] > 0) {
   $xsell_query_raw = "
  select distinct
    p.products_id,
    pd.products_name,
    pd.products_index_description,
    p.products_tax_class_id,
    p.products_price,
    p.products_iamge
  from " . TABLE_PRODUCTS_XSELL . " xp,
	   " . TABLE_PRODUCTS . " p
	   " . TABLE_PRODUCTS_DESCRIPTION . " pd
  where xp.products_id = '" . (int) $_GET['products_id'] . "'
    and xp.xsell_product_id = p.products_id
    and p.products_id = pd.products_id
    and pd.language_id = '" . $languages_id . "'
    and p.products_status = '1'
  order by xp.sort_order asc
  limit " . MAX_DISPLAY_ALSO_PURCHASED .
  "";

   $xsell_query = tep_db_query ($xsell_query_raw);
   $num_products_xsell = tep_db_num_rows($xsell_query);
   if ($num_products_xsell >= MIN_DISPLAY_ALSO_PURCHASED) {
?>
<!-- products_accessories //-->
<?php
  $info_box_text = '';
  $box_number = 1;
  $space_above = false;
  while ($xsell_products = tep_db_fetch_array ($xsell_query) ) {

    $cPath_new = tep_get_product_path( $xsell_products['products_id'] );
    $current_categories_id = strrchr( $cPath_new, '_' );
    $current_categories_id = trim( $current_categories_id, '_' );
    $categories_name = tep_get_category_name( $current_categories_id, $languages_id );

    echo '<a href="' . tep_href_link( FILENAME_PRODUCT_INFO, 'cPath=' . $cPath_new . '&products_id=' . $xsell_products['products_id'], 'NONSSL', true, true, $categories_name, $xsell_products['products_name'] ) . '">';

    // Draw a box around the product information
    echo '<span class=imageBox id="box_' . $box_number . '"';
    if (SPECIFICATIONS_ACCESSORIES_MOUSEOVER == 'True') {
	  // Change the colors in the next line to change the mousover color of the border
	  echo ' onmouseover="set_CSS(\'box_' . $box_number . '\',\'borderColor\',\'#aabbdd\')" onmouseout="set_CSS(\'box_' . $box_number . '\',\'borderColor\',\'#182d5c\')" ';
    }
    echo '>';

    // Show the products image if selected in Admin
    if (SPECIFICATIONS_ACCESSORIES_IMAGE == 'True') {
	  echo tep_image (DIR_WS_IMAGES . $xsell_products['products_image'], $xsell_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="2" vspace="3"');
	  $space_above = true;
    } //if (SPECIFICATIONS_ACCESSORIES_IMAGE

    // Show the products name if selected in Admin
    if (SPECIFICATIONS_ACCESSORIES_NAME == 'True') {
	  if ($space_above == true) {
	    echo "<br>\n";
	  }

	  echo '<b>' . $xsell_products['products_name'] . '</b>';
	  $space_above = true;
    } //if (SPECIFICATIONS_ACCESSORIES_NAME

    echo '</span>' . "\n";
    echo '</a>';

    $box_number++;
  } // while ($xsell_products

?>
<!-- products_accessories_eof //-->
<?php
   }
 }
?>

Thanks for the bug report. I'll update the Addon files in a bit.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Version 1.1.9 has been uploaded to the Addons site. As always, it is available from my server until the official version is approved.

 

This fixes the above bugs in the cross-sell tab.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim,

 

I am having a problem with the "specifications tab". when it calls the "products_specifications_input.php" line 37

 

if ($count_specificatons > 0) {

 

There are no specifications yet for the product so it jump straight over the code and does not call line 109

 

echo tep_draw_textarea_field ('products_specification[' . $id . '][' . $languages[$i]['id'] . ']', 'soft', '70', '3', $products_specification);

 

Any ideas what may be going wrong?

 

Also if i enter data under any of the tabs other than the description tab it does not save. If you reload the product there is not data

 

Regards

 

 

Bret

Share this post


Link to post
Share on other sites

Version 1.1.9 has been uploaded to the Addons site. As always, it is available from my server until the official version is approved.

 

This fixes the above bugs in the cross-sell tab.

 

Regards

Jim

 

Strange.. I put up the new files, and under the Accessories tab I still get the same error:

 

"

Reccommended Accessories for: A Bug's Life[DVD-ABUG

 

Warning: include_once(includes/modules/products_accessories.php ) [function.include-once]: failed to open stream: No such file or directory in C:\wamp\www\hlm\includes\modules\products_tabs.php on line 294

Warning: include_once() [function.include]: Failed opening 'includes/modules/products_accessories.php ' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\hlm\includes\modules\products_tabs.php on line 294

"

 

Im sure the file exist.. Checked several times, also checked the spelling etc.

Edited by mumme

Share this post


Link to post
Share on other sites

Bret: Why do you expect to be able to enter data for a Specification that does not exist? This doesn't make any sense to me.

 

The other tabs work on my test site. Check that you have not missed an edit to admin/categories.php.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

mumme: I don't understand how the file can not be found if it exists. Check the file location again. If it's really in the right place, I don't understand why it would not work.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

would have thought is obvious.

If you dont have any specifications yet on the product then you should have a way of entering the product specifications.

When i run the website in debug mode, because i dont have any specs saved for the product the "$count_specificatons " will be = "0"

 

That is what i was trying to say in the above message. It does not load the ckeditor or any other fields for me to enter the specifications for the product.

It jumps over the section of code that creates an instance of the text field or ckeditor depending on which you use.

 

 

On all the other tabs it opens the ckeditor for you to enter data. Except the "Specifications Tab"

 

If you enter data in any of the other tabs excluding the description tab it does not save what you type in........

Share this post


Link to post
Share on other sites

You do have a way of creating new Specifications. Please read Section 4.2 of the User's Manual.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

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

×