Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Description 1.3


Guest

Recommended Posts

thanks, only one other question, what code am i looking for to change??

 

is it this?? and if yes, how would i alter it as you mentioned above???

I'm a little lost here..

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$lc_text = TABLE_HEADING_MODEL;

$lc_align = '';

break;

 

case 'PRODUCT_LIST_NAME':

$lc_text = TABLE_HEADING_PRODUCTS;

$lc_align = '';

break;

 

case 'PRODUCT_LIST_MANUFACTURER':

$lc_text = TABLE_HEADING_MANUFACTURER;

$lc_align = '';

break;

 

case 'PRODUCT_LIST_PRICE':

$lc_text = TABLE_HEADING_PRICE;

$lc_align = '';

break;

 

case 'PRODUCT_LIST_QUANTITY':

$lc_text = TABLE_HEADING_QUANTITY;

$lc_align = '';

break;

 

case 'PRODUCT_LIST_WEIGHT':

$lc_text = TABLE_HEADING_WEIGHT;

$lc_align = '';

break;

 

case 'PRODUCT_LIST_IMAGE':

$lc_text = TABLE_HEADING_IMAGE;

$lc_align = '';

break;

 

case 'PRODUCT_LIST_BUY_NOW':

$lc_text = TABLE_HEADING_BUY_NOW;

$lc_align = '';

break;

}

Miz

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

Contributions

New Fields with Easy Populate

Remove Category Images

Link to comment
Share on other sites

  • Replies 297
  • Created
  • Last Reply

Top Posters In This Topic

thanks, only one other question, what code am i looking for to change??

 

is it this?? and if yes, how would i alter it as you mentioned above???

I'm a little lost here..

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$lc_text = TABLE_HEADING_MODEL;

$lc_align = '';

break;

.....................................................

}

 

I have the same problem and same question. I've looked at the page until I'm squint but understand too little of how the layout actually works to try to change anything.

Link to comment
Share on other sites

Hoping for a bit of help here. I've installed the short_desc mod and can't get the short description to display unless I select a manufacturer. So, I've narrowed it down to this:

 

case 'PRODUCT_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc'] . '?';

} else {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc'] . '?';

}

 

 

It's somewhere in the "else" code. For some reason it's not retrieving the short description from the database but it will if you select a manufacturers id.

 

I've searched for answers and can find none. My computer is just about broken from me beating my head against it. I'd appreciate any help!

Edited by jeeperz
Link to comment
Share on other sites

Could be some other code you have somewhere further down. Does the products name being displayed?

 

Here is the line I used is pretty much the same like yours:

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc'];

Link to comment
Share on other sites

Could be some other code you have somewhere further down. Does the products name being displayed?

 

Here is the line I used is pretty much the same like yours:

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $listing['short_desc'];

 

Yes, the products are shown with the Model, Manufacturer, Name, Price, and Buy Now columns (I don't currently have images associated the products).

 

To test, I put extra text just before the anchor tag and it prints out in front of the product name.

Link to comment
Share on other sites

ok can you post a url to see it? I would like to see how it displays the short description when the product has a manufacturer assigned.

Edited by enigma1
Link to comment
Share on other sites

ok can you post a url to see it? I would like to see how it displays the short description when the product has a manufacturer assigned.

Sorry for the delay, I had an unfortunate hard drive crash....

 

The URL to see the short description with manufacturer assigned is Short Desc Working

 

The URL that should show it is Short Desc Not Working

 

Thanks!

Link to comment
Share on other sites

Newbie here, so I apologize if this has been answered here previously.

 

I have successfully installed the short description contribution, but would like the short description to appear on the home page for each product listed under "New for [this month name]"

 

Currently I have the default page where the new products table shows an image, product name, and price. My store is not live at this time.

 

Thanks in advance for any tips.

Link to comment
Share on other sites

Sorry for the delay, I had an unfortunate hard drive crash....

 

The URL to see the short description with manufacturer assigned is Short Desc Working

 

The URL that should show it is Short Desc Not Working

 

Thanks!

 

Ok the catalog\index.php should have the code to get the short_desc column from the dbase. There is an if/else statement in that file. Here is part of that code so should be easy to locate it.

 

// show the products of a specified manufacturer
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category

 

Below you will see the variable $listing_sql that is set with the sql query strings. There are 4 case there within the if/else statements. Make sure each one of them includes the short_desc field. For example the manufacturer has a line like this:

		$listing_sql = "select " . $select_column_list . " p.products_id, p.short_desc, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

 

Check on all 4 of those the p.short_desc is present.

Link to comment
Share on other sites

Check on all 4 of those the p.short_desc is present.

You are a GENIUS!

:thumbsup:

 

I remember reading in the install about 4 spots to add that too, and I remember doing it but maybe it wasn't that file....

 

Problem solved, thank you very much!

Link to comment
Share on other sites

What would be excellent is if there was a way to import the short_desc field into the database through EP. I was looking through the file modifications made for the short_desc mod but I'm not familiar enough to start coding away but it seems to me that the short_desc field should not have been added to the products table but instead to the products_description or products_to_categories tables. (?)

 

Any pointers?

Link to comment
Share on other sites

Hello Kevin, you need to keep the short description in the products or products_descirption sql tables. Because the products_to_categories is a mapping table so you may end up with duplicates of the short description text in the table thus taking more space on the server (when you set links for products to multiple categories).

But I haven't deployed EP on my end to see the necessary mods. Can you ask the EP thread if one wants to add an extra column what needs to be done? They may have something there that could be applied for the a column like the short_desc.

Link to comment
Share on other sites

Hello Kevin, you need to keep the short description in the products or products_descirption sql tables. Because the products_to_categories is a mapping table so you may end up with duplicates of the short description text in the table thus taking more space on the server (when you set links for products to multiple categories).

But I haven't deployed EP on my end to see the necessary mods. Can you ask the EP thread if one wants to add an extra column what needs to be done? They may have something there that could be applied for the a column like the short_desc.

I hate to say it, but I removed the short_desc contribution (after all that work!) and installed the "Products Short Descriptions" contribution (1.03, I think). This puts the short description into the products_descriptions sql table. I then went through EP and made the same modifications that were made in some of the other files to see if I could get it to work. And I did! I can now import/export the "products_info" data through EP.

 

I reallly liked the product listing display with the short_desc much better than this one, but I can work around that.

 

Thanks again for the help before!

Link to comment
Share on other sites

  • 2 weeks later...

I installed "Short_Description_v2" and at first it "broke" my admin catalog with a tep stop reference to p.products_pdfupload:

 

8/ ################# SEARCH FOR #################// 
if (isset($HTTP_GET_VARS['search'])) {
  $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image,  pd.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, 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 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");
}
  #################### REPLACE WITH #######################//
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_pdfupload, pd.short_desc, pd.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, 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_pdfupload, pd.short_desc, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status 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");
}

 

I removed the reference to p.products_pdfupload and things were usable again, but with 2 noticeable problems:

 

1. Short decriptions are not in the standard product lisings, but are fine in new products or results of a product search.

 

2. If a manufacturer is selected from the manufactures info box instead of showing the products it instead opens an advanced search with the highlighted error:

 At least one of the fields in the search form must be entered.

If a manufactuer is selected when on the Manufacturer Info infobox, then all the products display properly.

 

Any suggestions are appreciated.

Link to comment
Share on other sites

I read this thread a dozen times and figured out the missing info in index.php so now I have short descriptions everywhere I want them.

 

I cannont figure out why my manufactures infobox no longer works properly. When a manufacturer is selected it points to:

 

 

http://www.hotshotmagic.com/catalog/advanc...facturers_id=12

 

and that brings up:

Advanced Search

At least one of the fields in the search form must be entered.

 

And it never did that before...

:(

Edited by HSMagic
Link to comment
Share on other sites

I read this thread a dozen times and figured out the missing info in index.php so now I have short descriptions everywhere I want them.

 

I cannont figure out why my manufactures infobox no longer works properly. When a manufacturer is selected it points to:

http://www.hotshotmagic.com/catalog/advanc...facturers_id=12

 

and that brings up:

Advanced Search

At least one of the fields in the search form must be entered.

 

And it never did that before...

:(

I don't even see a manufacturers infobox on your site so I can't really help.

Link to comment
Share on other sites

  • 4 weeks later...

I installed Product Short Description v.2 which is mod by josh modified by aviveros.

It is working on product_listing page, but I found difficulties with module new_products.

I've added pd.short_desc to sql query and received error "Unknown table 'pd' in field list". I'm not familiar with sql queries, hopping someone will help.

 

The query code, modified by SPPC, is as follow:

  if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = tep_db_query("select p.products_id, p.products_image, pd.short_desc, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.short_desc,  p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit ". MAX_DISPLAY_NEW_PRODUCTS);
 }

 

Chris

Link to comment
Share on other sites

I installed Product Short Description v.2 which is mod by josh modified by aviveros.

It is working on product_listing page, but I found difficulties with module new_products.

I've added pd.short_desc to sql query and received error "Unknown table 'pd' in field list". I'm not familiar with sql queries, hopping someone will help.

 

Did you add the "short_desc" to the database?

Link to comment
Share on other sites

Thanks for reply.

Mark, I'm little confused. Some time ago you wrote here that the table for short_desc could be products or products_description.

You are my guru and I'm going to change the code, but could you please describe shortly the difference?

 

Chris

Link to comment
Share on other sites

if you follow the instructions for the contribution that includes the short_desc field (there are 2 contributions for short description both point to this thread) then the short_desc field is under the TABLE_PRODUCTS

 

with v2 they moved it to the TABLE_PRODUCTS_DESCRIPTION to support multiple languages. This is because this description table has the language_id field included.

 

So scratch what I said earlier that was valid for v.1 Using the default catalog\pproducts_new.php file the query for v2 should be:

 

  $products_new_query_raw = "select p.products_id, pd.products_name, pd.short_desc, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";

 

I just added the pd.short_desc after the pd.products_name. The pd table is defined and points to TABLE_PRODUCTS_DESCRIPTION.

Link to comment
Share on other sites

I really screwed it up!

 

I followed the instructions and added the sql code into the database. Then I update the browser and get this:

 

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

1064 - You have an error in your SQL syntax near ' p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, ' at line 1

 

select p.products_image, pd.products_name, pd.products_description,, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '59' order by pd.products_name

 

[TEP STOP]

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

 

Does anyone know what is wrong? I need to fix this fast cos im knee deep in it now that the site is down :-(

Link to comment
Share on other sites

Somehow the first time when i replaced the edited files with my backups they didn?t get replaced. I don?t know why but I decided to overwrite them again, just in case, and guess what. The site is back up.

Still I have the above 1064 error code with this contrib. Anyone have any suggestions?

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