Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Products Specifications


kymation

Recommended Posts

Hi Jim,

 

I finally make the Accessories works properly.

 

I installed XSell 2.3.1 version and it works ok with Products Specification.

And I also link the specifications with the categories/products, and they works perfectly.

 

I have 2 more questions:

http://postimage.org/image/jhykcs38f/

 

Q1: with XSell, I like to modify the layout in the Accessories Tab, how can I do it?

 

Q2: I had Sitemap SEO installed, the code in in catalog/product_info.php

 

 <!-- Begin Sitemap SEO -->
 <script type='text/javascript' src='javascript/sitemap_seo.js'></script>
 <?php
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO);
 include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_PRODUCT);
 include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_CATEGORY);
 include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_MANUFACTURERS);
 ?>
 <!-- End Sitemap SEO -->

 

Sitemap SEO at the bottom of the product_info.php it will show related product and related catelog.

 

how can I make this post on Reviews Tab?

 

Many thanks in advance.

 

Lyn

Edited by ce7
Link to comment
Share on other sites

1. The Accessories tab contents are in includes/modules/products_accessories.php.

 

2. The Reviews tab contents are in includes/modules/product_reviews.php.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi Jim

 

I have installed ckeditor but i dont want to use it on my products_tabs, I have removed "class="ckeditor" (as you suggested in earlier post )from admin/includes/modules/products_tabs.php but it still appears. Is there a step that I am missing,

 

I also get this error in firebug

uncaught exception: [CKEDITOR.editor.replace] The element with id or name "" was not found.

The reason I want to remove it is that it seems to break the tab structure.

 

I would really appreciate any help.

 

Thanks

Claire

Link to comment
Share on other sites

Hi Jim,

 

It's Lyn again, hope you have a nice week.

 

I just wonder with Product Specification, is it possible to add new tabs (another two and I like to name it myself)

 

is it simple just copy one of the includes/modules/ xxx.php file and rename it?

and then change the includes/languages/english.php?

 

if I am wrong, what are the right steps to do it?

 

Many thanks in advance.

 

Lyn

Link to comment
Share on other sites

There are 6 "extra" tabs already included. They are named Manuals, Video, Accessories, Reviews, Warranty, and Shipping by default. The tab names are assigned to the constants TEXT_TAB_1 ... TEXT_TAB_6. You can change those titles to anything you want, but you need to make the changes in both the Catalog and Admin sides. The tabs will show up on a product page if there is anything entered into them on the Admin side.

 

If you want to link a module to a tab to retrieve data from some other location, you'll have to do some coding. Use one of the existing modules as a guide.

 

Regards

Jim

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

Link to comment
Share on other sites

There are 6 "extra" tabs already included. They are named Manuals, Video, Accessories, Reviews, Warranty, and Shipping by default. The tab names are assigned to the constants TEXT_TAB_1 ... TEXT_TAB_6. You can change those titles to anything you want, but you need to make the changes in both the Catalog and Admin sides. The tabs will show up on a product page if there is anything entered into them on the Admin side.

 

If you want to link a module to a tab to retrieve data from some other location, you'll have to do some coding. Use one of the existing modules as a guide.

 

Regards

Jim

 

Hi Jim

 

Thank you very much for your reply,

I had made four new tabs show up in the admin site. The problem now is that when I type information in the new tabs, it doesn't save and show in the front page. (I had add extra products_tab_7, products_tab_8,products_tab_9,products_tab_10 into product description table).

 

As you mentioned on this reply,

use the exsiting module as a guide, I can see, ask_a_questions, comparison, product_attributes, product_info_process, product_tabs..., I did not see Video, Manual nor shipping....

which module you suggest to use as a guide for me?

 

(Sorry I may sound silly and ask you a lot of simple questions, I am trying my best to learn in limited time, and hopefully I have less questions in the near future....)

 

thank you very much in advance.

 

Lyn

Edited by ce7
Link to comment
Share on other sites

Let's start with the basics: Is there some reason why you can't use one of the 6 included extra tabs? If so, what is that reason.

 

Regards

Jim

 

 

Hi Jim,

 

The 6 tabs I like to keep them all and I need extra 2 tabs at least, so I made 4 tabs (two spare).

We have very different products range, some need video, some need other information, so one product maybe not use all the tabs in one time, but all the tabs need to be there and extra tabs required.

 

Lets say product A use Description Tab, Video Tab, Manual Tab, Shipping Tab; product B use Description Tab, Specifications Tab, Shipping Tab, Warranty Tab, product C use Decription Tab, Accessories Tab, Specification Tab, Demo Tab(different to Video), and symbols Tab.

 

So at least I need two more tabs, if I know how to make the extra tabs properly, in the future if I need it, I can always add it on myself.

 

So far, I modified several of your files and it showed up in admin the only thing doesn't work is not saving the value I enter. So need to figure out how to do it properly.

 

in the modules folder, I didn't see tabs for video, shipping nor warranty, but it does show in the admin product page, the I see the related file is the products_tabs.php. So which module I should refer to make it works to save into database and show up in the front page?

 

Many thanks in advance.

 

Lyn

Link to comment
Share on other sites

 

 

Hi Jim,

 

The 6 tabs I like to keep them all and I need extra 2 tabs at least, so I made 4 tabs (two spare).

We have very different products range, some need video, some need other information, so one product maybe not use all the tabs in one time, but all the tabs need to be there and extra tabs required.

 

Lets say product A use Description Tab, Video Tab, Manual Tab, Shipping Tab; product B use Description Tab, Specifications Tab, Shipping Tab, Warranty Tab, product C use Decription Tab, Accessories Tab, Specification Tab, Demo Tab(different to Video), and symbols Tab.

 

So at least I need two more tabs, if I know how to make the extra tabs properly, in the future if I need it, I can always add it on myself.

 

So far, I modified several of your files and it showed up in admin the only thing doesn't work is not saving the value I enter. So need to figure out how to do it properly.

 

in the modules folder, I didn't see tabs for video, shipping nor warranty, but it does show in the admin product page, the I see the related file is the products_tabs.php. So which module I should refer to make it works to save into database and show up in the front page?

 

Many thanks in advance.

 

Lyn

 

like to update / verify the problem I am having now:

in admin Categories/Product Edit Product pages, the value in new Tabs, eg, tab_7, tab_8, tab_9, tab10, it does save the value in the database, double check the database, but the problem is that it doesn't show in the front page.

 

Lyn

Link to comment
Share on other sites

You need to add your new tabs into catalog/includes/modules/products_tabs.php. There are two locations for each tab: The first one is for the tab part, and the second is to display the contents. Look for the existing tabs 1-6 and copy those. You'll also have to modify catalog/product_info.php to add the new database fields to the $product_info array.

 

Regards

Jim

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

Link to comment
Share on other sites

You need to add your new tabs into catalog/includes/modules/products_tabs.php. There are two locations for each tab: The first one is for the tab part, and the second is to display the contents. Look for the existing tabs 1-6 and copy those. You'll also have to modify catalog/product_info.php to add the new database fields to the $product_info array.

 

Regards

Jim

 

Hi Jim,

 

Thanks for the reply.

I did the products_tab.php and it is all fine, the problem is the product_info.php and thank you so much to point it out. It works great now!

 

Thank you very much again!

 

Have a nice weekend!

 

Lyn

Link to comment
Share on other sites

Yes, there is a filters box that can be used in either column. It's optional, like most of the other features. I have an updated version that Gary Burton contributed, so let me know if you want that.

 

Regards

Jim

 

hi

which version should i download for 2.3.3?

is there a download link to the latest version i should install?

thanks

Link to comment
Share on other sites

Use the 2.3.1 link below. Compare the existing files in your store with the ones from the download so you don't overwrite some of the 2.3.3 changes. Read the User's Manual carefully, as this is a big install.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 2 weeks later...

1. The Accessories tab contents are in includes/modules/products_accessories.php.

 

2. The Reviews tab contents are in includes/modules/product_reviews.php.

 

Regards

Jim

 

 

1. The Accessories tab contents are in includes/modules/products_accessories.php.

 

2. The Reviews tab contents are in includes/modules/product_reviews.php.

 

Regards

Jim

 

 

hi Jim,

 

I had tried to move the code for SEO to products_accessories.php

 [color="#880000"]<!-- Begin Sitemap SEO -->[/color]
[color="#000088"]<script[/color] [color="#660066"]type[/color][color="#666600"]=[/color][color="#008800"]'text/javascript'[/color] [color="#660066"]src[/color][color="#666600"]=[/color][color="#008800"]'javascript/sitemap_seo.js'[/color][color="#000088"]></script>[/color]
[color="#666600"]<?[/color][color="#000000"]php[/color]
[color="#000088"]require[/color][color="#666600"]([/color][color="#000000"]DIR_WS_LANGUAGES [/color][color="#666600"].[/color][color="#000000"] $language [/color][color="#666600"].[/color] [color="#008800"]'/'[/color] [color="#666600"].[/color][color="#000000"] FILENAME_SITEMAP_SEO[/color][color="#666600"]);[/color]
[color="#000000"]include[/color][color="#666600"]([/color][color="#000000"]DIR_WS_MODULES [/color][color="#666600"].[/color][color="#000000"] FILENAME_SITEMAP_SEO_PRODUCT[/color][color="#666600"]);[/color]
[color="#000000"]include[/color][color="#666600"]([/color][color="#000000"]DIR_WS_MODULES [/color][color="#666600"].[/color][color="#000000"] FILENAME_SITEMAP_SEO_CATEGORY[/color][color="#666600"]);[/color]
[color="#000000"]include[/color][color="#666600"]([/color][color="#000000"]DIR_WS_MODULES [/color][color="#666600"].[/color][color="#000000"] FILENAME_SITEMAP_SEO_MANUFACTURERS[/color][color="#666600"]);[/color]
[color="#666600"]?>[/color]
[color="#880000"]<!-- End Sitemap SEO -->[/color]

 

but it doesn't seems show up in the accessories tab. How can I make it show up in every products?

 

Many thanks in advance.

 

Lyn

Link to comment
Share on other sites

  • 2 weeks later...

Hi Jim.

 

I have a small problem I really dont know how to solve.

On the product_info page I want the Products Specification to load data from an Existing database field.

For example products_color. But the information isnt visible on the product_info.php

 

If a make a specification that dosent load information from an existing table the information shows,

but none of the information thats collects from the existing database tables.

 

I have read the manual several times, checked all settings twice, and checked the database in phpmyadmin to see that there is data in the fields.

Link to comment
Share on other sites

If you have added the products_color database field yourself, then it is your responsibility to provide a means to enter data into that field. Product Specifications will read the data you have supplied in that field and use it in specifications if you tell it to. If you want to have Product Specifications handle the data input as well, that has to be a Specification field and not an existing field.

 

Data from existing fields should show when you have specified that is should. Where are you trying to show the data, and what fields? Do you have the Specification enabled for that page, and is the Specification Group enabled for that page? Is the Specification Group linked to the category that product is in?

 

Regards

Jim

 

Edit: Spelling

Edited by kymation

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

Link to comment
Share on other sites

If you have added the products_color database field yourself, then it is your responsibility to provide a means to enter data into that field. Product Specifications will read the data you have supplied in that field and use it in specifications if you tell it to. If you want to have Product Specifications handle the data input as well, that has to be a Specification field and not an existing field.

 

Data from existing fields should show when you have specified that is should. Where are you trying to show the data, and what fields? Do you have the Specification enabled for that page, and is the Specification Group enabled for that page? Is the Specification Group linked to the category that product is in?

 

Regards

Jim

 

Edit: Spelling

 

To the extra fields in the database eg. "products_extra_colors", "products_extra_length" and "products_extra_width" I enter the information with help of Easypopulate and / or categories.php.

I have information in the fields , I have checked that in the database. All extra fields is in he Products-table.

 

Im trying to show the data on product_info.php and your PDF-datasheet contribution.

Both pages works if I creat a "specification-field", but not when it should collect data from an existing feld.

 

Here is the settings in admin/products_specification.php

 

Group name: Features

Show Comparision Page: True

Show on Product info page: True

Show Filter: True

 

Speficication

 

Specification Name: Color

Specification Description:

Specification Prefix:

Specification Suffix:

Sort Order: 0

Justification: Left

Column Name: products_e_color

Filter Class: none

Display the Filter as:

Filter Show All: True

Enter Specification Values as: text

Filters on this Specification: 0

 

 

To makes sure it is linked to the categorie, I have linked it to all categories for testing purpous.

Edited by mumme1
Link to comment
Share on other sites

To make sure i didnt missed anything I created a new specification group and linked it to all categories.

I created two new specifications.

 

1 - Specification field with textbox to enter information in categories under the specification tab.

 

2 - Field that should pick information from products_id.

 

On product_info and pdf-datasheet I can see information from the specification textbox, but not the filed tht shuld pick the products id.

Link to comment
Share on other sites

Product Specifications was designed to work with the existing product fields in a stock copy of osCommerce. You will need to modify the code to add additional fields that are not a part of stock osCommerce. You will need to add code to tep_fill_existing_fields() and tep_specification_table_cell() in includes/functions/products_specifications.php to display the field in category or comparison pages.

 

I don't recommend adding additional fields outside Products Specifications. This will cause you a lot of extra work.

 

Regards

Jim

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

Link to comment
Share on other sites

Product Specifications was designed to work with the existing product fields in a stock copy of osCommerce. You will need to modify the code to add additional fields that are not a part of stock osCommerce. You will need to add code to tep_fill_existing_fields() and tep_specification_table_cell() in includes/functions/products_specifications.php to display the field in category or comparison pages.

 

I don't recommend adding additional fields outside Products Specifications. This will cause you a lot of extra work.

 

Regards

Jim

 

The problem for me is that I need to add like 4000 products, with aprox 30-40 different infomation fields.

To import all the data is easy to do it with easypopulate or create a sql-file from the existing product database and just import that to Oscommerce.

I tought I could use Products Speficication to select which field to be shown in which category.

 

So if I undestand it correctly, in standard products specification cant show information from existing fields on "products_info.php"?

 

I checked the tep_fill_existing_fields() and tep_specification_table_cell().

In the functions there are references to eg Products Name and Products Model, but I cant get information from those files either on the product_info.php-page.

So I guess I need to do a bigger workaround to get it work?

 

So maybye, on the product_info.php its easier for me to do something like:

if ($products_color < 0) {
echo 'Product Color:' . $products_color;
}

 

Instead of trying to get the specification to work the way I want.

Link to comment
Share on other sites

You can not get the existing fields on the Product Info page because they are already there. You will have the same problem with any new fields that you add manually. Perhaps you are better off coding your own custom solution.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi Jim,

 

I had asked same question before, sorry I couldn't understand quite well about how to do, and it will be appreciately if you could give me more details about how.

 

for the Sitemap SEO it is added into product_info.php page

<!-- Begin Sitemap SEO -->

<script type='text/javascript' src='javascript/sitemap_seo.js'></script>

<?php require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO);

include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_PRODUCT);

include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_CATEGORY);

include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_MANUFACTURERS); ?>

<!-- End Sitemap SEO -->

 

 

How can I make them show up in accessory tab for each product?

Do I just copy and paste to the accessory tab in the backend or I put the code in the php file?

(I did try to put on php file but it doesn't show up anything, maybe I did it in the wrong way?)

 

Many thanks in advance.

 

Lyn

Link to comment
Share on other sites

I've never used that Addon so I can't tell you exactly how to use it. You should be able to paste the above code into any of the tabs, with the result that it will be added to the tab contents. That tab may not show without having some content that it expects to be there, or you will have to modify the tab to show up.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi Jim,

 

Thank you very much for your reply.

 

I had tried to copy ask_a_question and rename it as also_related for Sitemap SEO,

I add new configuration for also_related, which works ok,

I modified the product_tabs, which follow the rules you did, such as (tab_12 used)

 

<?php

// If the Also related tab is turned on in the Admin

if (SPECIFICATIONS_RELATED_TAB == 'True') {

?>

<li><a href="#tabs-22"><?php echo TEXT_TAB_12; ?></a></li>

<?php

}

?>

 

 

<?php

// The Also Related tab

if (SPECIFICATIONS_RELATED_TAB == 'True') {

echo ' <div id="tabs-22">';

include( DIR_WS_MODULES . FILENAME_ALSO_RELATED );

echo ' </div>';

}

?>

 

 

but i got this error message

 

Warning: include(includes/modules/FILENAME_ALSO_RELATED) [function.include]: failed to open stream: No such file or directory in //includes/modules/products_tabs.php on line 510

 

Warning: include(includes/modules/FILENAME_ALSO_RELATED) [function.include]: failed to open stream: No such file or directory in //includes/modules/products_tabs.php on line 510

 

Warning: include() [function.include]: Failed opening 'includes/modules/FILENAME_ALSO_RELATED' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:includes/phpids/lib/') in //includes/modules/products_tabs.php on line 510

 

 

and the also_related.php

<?php
 $model_info = '';
 if ($product_info['products_model'] != '') {
   $model_info = '<span class="smalltext">[' . $products_model . ']<span>';
 }
?>
<!-- also_related //-->
   <div class="inside_heading"><?php echo sprintf (TEXT_TAB_12_HEAD, $product_info['products_name']); ?> <span class="smalltext">[<?php echo $product_info['products_model']; ?>]</span></div>
   <table cellpadding="0" cellspacing="0" width="100%" style="BORDER:none;background:none;">
 <?php
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO);
 include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_PRODUCT);
 include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_CATEGORY);
 include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_MANUFACTURERS);
 ?>
<!-- also_related //-->

 <script type='text/javascript' src='javascript/sitemap_seo.js'></script>

 

Have I did something wrong or I missed something else?

 

Many thanks in advance.

 

Lyn

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