Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Products Specifications


kymation

Recommended Posts

Sorry about the repost, but I realized I posted this on the "old" message thread....

 

I installed this contribution last night. At first, my catalog did not display correctly, but then we found a stray </table> in the stylesheet (likely my own error).

 

When I logged into my admin side however, nothing shows up except the configuration box. Clicking the links inside the configuration box does nothing. The last item listed in the configuration box is products specifications, but again all links do notyhing.

 

I have all of my files backed up and I used "Beyond Compare 3" to see if I did not "copy" over this code properly. I did not notice anything right away other than two other contributions I have installed which are Easy Populate and More Category Boxes.

 

Thoughts?

 

Doug

Link to comment
Share on other sites

This code doesn't make any changes to the Configuration box. That's all automatically generated from the database anyway. It sounds like you may have messed up your database. Check the configuration_group and configuration tables for errors or conflicts.

 

Regards

Jim

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

Link to comment
Share on other sites

This code doesn't make any changes to the Configuration box. That's all automatically generated from the database anyway. It sounds like you may have messed up your database. Check the configuration_group and configuration tables for errors or conflicts.

 

Regards

Jim

 

I pulled up both tables in myphpadmin and under maintenance checked both tables and they check out OK. My script guy did a "view source" from the Admin panel and he says it looks like the script stops short for some reason.

 

Here is what I see:

admin_panel.jpg

 

Below is the code from the "view source". Note I changed my domain name, admin folder name, and OSCADMINID number in case that could be used against me...

 

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>osCommerce Online Merchant Administration Tool</title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();">
<!-- header //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td><img src="images/oscommerce.gif" border="0" alt="osCommerce" title=" osCommerce " width="204" height="50"></td>
   <td align="right"><a href="http://www.oscommerce.com" target="_blank"><img src="images/header_support.gif" border="0" alt="Support Site" title=" Support Site " width="50" height="50"></a>  <a href="my_address/./"><img src="images/header_checkout.gif" border="0" alt="Online Catalog" title=" Online Catalog " width="53" height="50"></a>  <a href="my_address/./my_admin_folder/index.php?osCAdminID=a_number_im_not_posting"><img src="images/header_administration.gif" border="0" alt="Administration" title=" Administration " width="50" height="50"></a>  </td>
 </tr>
 <tr class="headerBar">
   <td class="headerBarContent">  <a href="my_address/./my_admin_folder/index.php?osCAdminID=a_number_im_not_posting" class="headerLink">Administration</a></td>
   <td class="headerBarContent" align="right"><a href="http://www.oscommerce.com" class="headerLink">Support Site</a>  |  <a href="my_address/./" class="headerLink">Online Catalog</a>  |  <a href="my_address/./my_admin_folder/index.php?osCAdminID=a_number_im_not_posting" class="headerLink">Administration</a>  </td>
 </tr>
</table><!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="125" valign="top"><table border="0" width="125" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<!-- configuration //-->
         <tr>
           <td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
   <td class="menuBoxHeading" onmouseover="this.style.cursor='hand'" onclick="document.location.href='my_address/./my_admin_folder/configuration.php?gID=1&selected_box=configuration&osCAdminID=a_number_im_not_posting'"> <a href="my_address/./my_admin_folder/configuration.php?gID=1&selected_box=configuration&osCAdminID=a_number_im_not_posting" class="menuBoxHeadingLink">Configuration</a> </td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
   <td class="menuBoxContent"><a href="http://my_address/./my_admin_folder/configuration.php?gID=1&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">My Store</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=2&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Minimum Values</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=3&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Maximum Values</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=4&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Images</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=5&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Customer Details</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=7&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Shipping/Packaging</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=8&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Product Listing</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=9&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Stock</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=10&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Logging</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=11&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Cache</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=12&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">E-Mail Options</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=13&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Download</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=14&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">GZip Compression</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=15&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Sessions</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=8675309&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">More Categories</a><br><a href="my_address/./my_admin_folder/configuration.php?gID=1610&osCAdminID=a_number_im_not_posting" class="menuBoxContentLink">Products Specifications</a><br></td>
 </tr>
</table>
           </td>
         </tr>
<!-- configuration_eof //-->

Link to comment
Share on other sites

Judging from that output, the configuration table is working. The next box is the Catalog box, so it's probably an error in the admin/includes/boxes/catalog.php or the /admin/categories.php file.

 

Regards

Jim

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

Link to comment
Share on other sites

Jim,

 

Thanks for the heads up. The error was definitely where you said it would be... From my script guy...

 

"In the admin/includes/boxes/catalog.php file, when the array statement for the product specifications link was added, the " ); " from the more_catagories statement should have been replaced with " <br>' . " The " ); " in the more_catagories statement was throwing the error. Once I replaced it with the " <br>' . " the admin was working."

 

Thanks again..

 

Doug

Link to comment
Share on other sites

Jim -

 

I sat down last night to start going through everything, and while my Admin panel loaded and I could access the Products Specifications in the configure tab, I could not access it in the Catalog tab. I also cannot access Categories/Products in the Catalog tab. On both, the file stops short at the same line...

 

For products specifications, the address bar reads /myadminfoldername/products_specifications.php?........ and it ends at:

 

<!-- body_text //-->
   <td width="100%" valign="top">
   <table border="0" width="100%" cellspacing="0" cellpadding="2">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">Groups</td>
           <td class="pageHeading" align="right"><img src="images/pixel_trans.gif" border="0" alt="" width="1" height="40"></td>
           <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td class="smallText" align="right">
<form name="search" action="http://mywebaddress/./myadminfoldername/products_specifications.php?osCAdminID=notpostingthis" method="get">Search for Group: <input type="text" name="search">

 

And the Categories / Products loads the same way and ends at the same line:

 

<!-- body_text //-->
   <td width="100%" valign="top">
   <table border="0" width="100%" cellspacing="0" cellpadding="2">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">Categories / Products</td>
           <td class="pageHeading" align="right"><img src="images/pixel_trans.gif" border="0" alt="" width="1" height="40"></td>
           <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td class="smallText" align="right">
<form name="search" action="http://mywebaddress/./myadminfoldername/categories.php?osCAdminID=notpostingthis" method="get">Search: <input type="text" name="search">

 

Any ideas on where I might have gone wrong? Im not able to locate anything in "beyond compare" and I looked for any files I may have missed when I FTP'd the new files via FileZilla. The catalog side works great by the way. Those that I let "peak" at the site really like the look of your add.

 

Doug

Link to comment
Share on other sites

It appears to be halting at tep_hide_session_id(). That would indicate that you are trying to use this on a version of osCommerce older than 2.2RC1. tep_hide_session_id() is in the osCommerce code from RC1 on. You can get a copy from the current distribution and install it.

 

In any case, I strongly recommend that you update to RC2a due to the number of security fixes. That is in addition to the security precautions detailed elsewhere on the forum, of course.

 

Regards

Jim

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

Link to comment
Share on other sites

It appears to be halting at tep_hide_session_id(). That would indicate that you are trying to use this on a version of osCommerce older than 2.2RC1. tep_hide_session_id() is in the osCommerce code from RC1 on. You can get a copy from the current distribution and install it.

 

In any case, I strongly recommend that you update to RC2a due to the number of security fixes. That is in addition to the security precautions detailed elsewhere on the forum, of course.

 

Regards

Jim

 

Jim,

 

My hosting provider included the package with my hosting account. It looks like they install version 2.2ms2. I'm going to assume that this is prior to the RC versions and begin the process of upgrading. *sigh*

 

Thanks,

Doug

Link to comment
Share on other sites

Yes, that's an old version. There's an upgrade package in the Addons section. It takes time, but it's not particularly difficult to do. Depending on how many other addons you have installed, it might be easier to start with a fresh copy of 2.2RC2a and re-install from there. Your choice.

 

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,

 

have you been able to make progress on an bulk-import tool like (or integrating with) easy populate ?

 

BRgds

Carine

P.S. also started using your Get 1 free script recently too !

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

great, if you need someone for testing, just let me know.

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

Hello,

 

Thank you very much for this contribution. So far it works fine with pulldown boxes displaying filter options filtering products_specifications.specification. Is that what happens? But, I would like to have a text box filtering a custom field in the products_descriptions table.

 

1. I have added field `products_keywords` [varchar 255] in the products_description table. Some records have values like 'castles' or 'still lifes'.

2. I have a specification group 'Keywords' and a specification 'Keywords' within. Group Keywords is linked to all categories.

3. `products_column_name` in table `specification` for Keywords is `products_keywords`

4. The settings as they show in de admin

 

Specification Name: Keywords

Specification Description:

Specification Prefix:

Specification Suffix:

Sort Order: 5

Justification: Left

Column Name: products_keywords

Filter Class: partial

Display the Filter as: text

Filter Show All: False

Enter Specification Values as: text

 

Filters on this Specification: 0

 

5 A text box titled 'Keywords' shows up at my site. If I enter the text 'castle', press enter, I get the following:

 

1054 - Unknown column 'products_keywords' in 'where clause'

 

select count(p.products_id) as count from (products p) join (products_to_categories p2c) on (p.products_id = p2c.products_id) left join (specials s) on (p.products_id = s.products_id) where p.products_status = '1' and p2c.categories_id = '111' and products_keywords like '%castle%'

 

[TEP STOP]

 

Running: mysql 5.1.37 ubuntu 9.10 oscommerce RC2.2a with STS4 (no other contribs)

 

I hope anyone can help. I would really appreciate it.

 

Regards,

 

L.

Link to comment
Share on other sites

The existing database fields option in Products Specifications was intended to support existing fields in stock osCommerce. You don't need to add a new database field to add a Specification. Just set up your Specification and it will be taken care of by the code. If that new field is a part of some other Addon, you'll need to modify the code to accept it.

 

Regards

Jim

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

Link to comment
Share on other sites

Testing on a fresh installed 2.2RC2a. I have created a specification 'Period' (EN), 'Zeit' (DE). This specification has two filters: 1. 'Middle Ages'(EN), 'Mittelalter' (DE), 2. 'Modern' (EN), 'Neuzeit'(DE). The DVD starring Bruce Willis has been given the specification 'Modern'/'Neuzeit'. When browsing the catalog in English, the filter box says there is one DVD which is 'Modern'. When browsing in German, the filter box says no DVD's , zero, greyed out.

 

When I change language_id in products_specifications to 1 (so 'Neuzeit' has 1), it shows up black having 1 DVD.

 

Does the filter box only read language_id=1?

But when I change in the table products_specification field specification 'Neuzeit' to 'Modern' (so that I have two language_id's with the same specification value) the filter shows up in German. So is this intended, should the specifications all be the same for it to work?

 

Can I change something so the filter box shows different values for different languages?

 

Thanks,

 

L.

Link to comment
Share on other sites

I didn't make the filters work with more than one language. I'll add that to the wish list, but it's unlikely to get fixed before the end of the year.

 

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

Am very interested to see this contribution in action.

 

Has anyone got an example to look at?

 

Would be greatly appreciated.

My latest osCommerce work in progress

 

no outside links in signatures allowed, see PM

Link to comment
Share on other sites

  • 4 weeks later...

I got the part to show the comparisons and all that, but i would like to keep the osCommerce-setup for showing the products..

 

 

For exampel, if you go in you admin-system and click Product Listing, you can choose what to show...

 

Display Product Image 1

Display Product Manufaturer Name 0

Display Product Model 0

Display Product Name 2

Display Product Price 3

Display Product Quantity 0

Display Product Weight 0

Display Buy Now column 4

Display Category/Manufacturer Filter (0=disable; 1=enable) 1

Location of Prev/Next Navigation Bar (1-top, 2-bottom, 3-both) 2

 

 

...and so on. Is it possible to add for example;

 

Display Product Specification: Size

Display Product Specification: Color

Display Product Specification: XXXX

 

 

Hope you know what i mean =)

 

//Zane

Link to comment
Share on other sites

Hmm.. well, i give it a try.

 

This is how my product listing looks today:

001.jpg

 

I want to add Size from Product Specification inside this red markings:

002.jpg

 

 

If i turn on "Comparison in Index", i just get this:

003.jpg

Edited by Zane86
Link to comment
Share on other sites

Now I think I understand. I can think of two ways to do this:

 

1. Turn on Comparison in Index. Set the Comparison fields to the ones you want to appear. That would be Image, Product Name, (the one you want to add), Final Price, and Buy Now. You will need to set up these Specifications if you have not already. This will mean that you cannot have a separate comparison page.

 

2. Modify the code in catalog/index.php to retrieve your new specification from the database, and catalog/includes/modules/product_listing.php to display the new field.

 

Regards

Jim

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

Link to comment
Share on other sites

Think i have to go with #2 then :P. But thats a lot of cracking code in a short time of period.

However, i aint using "model" at the time being - that might be a way out i guess.

 

Thanks for i great contrib anyway. It works really nice.

 

//Zane

 

---------------------------------

Edit:

 

I guess it's something like this:

 

in Index.php:

add

case 'PRODUCT_LIST_SPECIFICATION':

$select_column_list .= 'p.specification_id=50, '; //Since id 50 is Size from the DB for me)

break;

 

in product_listing.php:

 

case 'PRODUCT_LIST_SPECIFICATION':

$lc_text = TABLE_HEADING_SPECIFICATION;

$lc_align = '';

break;

 

 

 

And then alter the code on a lot of places and so on.... Short description... p

(and by the way.... php aint my biggest friend)

 

Cheers

Edited by Zane86
Link to comment
Share on other sites

Not quite. Specifications are stored in the products_specifications table, not the products table. Take a look at the SQL in catalog/includes/modules/products_specifications.php.

 

Regards

Jim

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

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