Jump to content
Gamer

Product Description 1.3

Recommended Posts

Hi all,

 

The only bug in this fine contribution (it is the easiest to control and install out of similar contribs) is that it does not effect the products_new.php file.

 

Product Description 1.3 Contribution

 

The point of the contrib is to add a short product description in the product listings. It does this well for advanced search results and normal listings in categories.

 

Can anyone look at this code and try to advise me on how to implement it to also show on the products_new.php listings page.

 

Product Description 1.3 Contribution

 

Thank you kindly

Share this post


Link to post
Share on other sites

can u give me a url to see this on a working store. I have implimented my own short descritpion into my osc at MY STORE but i dont know if u have a seperate feild in the db to store the info for the short desc. write me back, or email me direct on joma(AT)austarnet.com.au

Share this post


Link to post
Share on other sites
I have implimented my own short descritpion into my osc at MY STORE but i dont know if u have a seperate feild in the db to store the info for the short desc. write me back, or email me direct on joma(AT)austarnet.com.au

 

Hallo,

your short description looks like the one i am searching for. Is it in the contribution section or is it not public? The best thing would be, if it draws the short description from a separate field (i have already one for featured products). Thanks in advance,

Philipp from Germany


greetings from Germany

 

Philipp

Share this post


Link to post
Share on other sites

My mod writes a new feild seperate from the main description into the products info called short_desc . It builds the new feild when adding a new product. If this is what you want contact via email, as i do not have any documentation on this, it was not a contribution, just done it as it went.

 

Gamer, give me some time and i will see what i can do, you can add me to your AIM/AOL whatever it is called, name : jomawebdesign

Share this post


Link to post
Share on other sites

This is the error I am getting how can I fix it?

 

Fatal error: Cannot redeclare tep_flatten_product_description() (previously declared in /home/virtual/site23/fst/var/www/html/cart/includes/functions/general.php:1254) in /home/virtual/site23/fst/var/www/html/cart/includes/modules/product_listing.php on line 16

--

 

John Cannon

Share this post


Link to post
Share on other sites

Hi Everyone

 

We have installed this excellent contribution and is working pretty much first up.

 

We have a small problem with the display off the product descriptions however. We have a duplicate product descrip appearing. Does anyone know or can suggest how to modify this?

 

The text under the image is not really required. So we just need to remove this if possible?

 

product_description.jpg

 

We are also interested in have a short description in product admin like others have mentioned here? Is this a new contribution that is available?

Share this post


Link to post
Share on other sites

Remove this description from under the image by removing one of the insertions made to catalog /includes/modules/product_listing.php

 

Insertion to remove:

             if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
           $lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'],  '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';

 

The instructions say to find and add one instance of this at about line 100 and another at about line 114. One of these instances is not required, I cannot remember which one. Simply use trial an error if you can't look at the code and work out which one is sitting under the image and which one is not.

Share this post


Link to post
Share on other sites
Remove this description from under the image by removing one of the insertions made to catalog /includes/modules/product_listing.php

 

Insertion to remove:

 ? ? ? ? ? ? if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
? ? ? ? ? ?$lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'], ?'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';

 

The instructions say to find and add one instance of this at about line 100 and another at about line 114. One of these instances is not required, I cannot remember which one. Simply use trial an error if you can't look at the code and work out which one is sitting under the image and which one is not.

 

Thank you this works perfectly now.

Share this post


Link to post
Share on other sites

Hey all,

 

I feel like I am losing my mind.

 

Is there a place to put a small description, or is it pulling the description from the main product description?

 

If the latter instance is true, nothing is happening. No description.. nadda.

 

I was hoping that there would be a contribution that allows you to add a separate small description to the product lisintgs (maybe located in the admin section under the products "edit" pages). Is there a mod like this out there?

 

Thanks to everyone for all the great work!

 

Dean

Share this post


Link to post
Share on other sites

One more thing,

 

For this addition:

 

if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
$lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'],  ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';

 

Should there be brackets before and after the "if" clause, like this:

 

if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH) {
$lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'],  ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>'; 
}

 

I am going to try and figure this one out.. good luck to me.

 

Thanks for any help

Edited by SnyderHealth

Share this post


Link to post
Share on other sites
One more thing,

 

For this addition:

 

if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)
$lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'], ?' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>';

 

Should there be brackets before and after the "if" clause, like this:

 

if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH) {
$lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'], ?' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>'; 
}

 

I am going to try and figure this one out..  good luck to me.

 

Thanks for any help

 

No, no brackets

Share this post


Link to post
Share on other sites
Hey all,

 

I feel like I am losing my mind.

 

Is there a place to put a small description, or is it pulling the description from the main product description?

 

If the latter instance is true, nothing is happening.  No description.. nadda.

 

I was hoping that there would be a contribution that allows you to add a separate small description to the product lisintgs (maybe located in the admin section under the products "edit" pages).  Is there a mod like this out there?

 

Thanks to everyone for all the great work!

 

Dean

 

It pulls the description from the main description, strips the html and displays the amount of characters from the main description as per settings in admin.

Share this post


Link to post
Share on other sites

My mod works from a seperate feild from the database, I enter what i want in product edit, SEE 2nd POST, I will work on making thins into a contribution so everyone can use it, Gamer, i will have a look at your thing aswell. If you are interested in my mod email me direct, and i will send the mod direct to you

 

joma"AT"austarnet.com.au

Share this post


Link to post
Share on other sites

OK, i have made my mod into a contribution and have posted it on the osc webpage. If you need anyhelp contact me here or by email which is all over this page anyhow.

 

 

CLICK HERE TO DOWNLOAD

 

thats about all...Later guys, and good luck

Share this post


Link to post
Share on other sites

Josh,

 

I think I just dropped one in my pants! (huh?)

 

It's awesome... BLOODY AWESOME!! (Oh wait, I'm not British)

 

Your mod was EXACTLY what I was looking for. Thanks brother!!

 

I installed it (was a bit tedious trying to parse all the data because my site has been SUPER modified) ...and it works great.

 

If you want, take a look (http://shop.snyderhealth.com). I only did the Jupiter Water Ionizers at this point, but I will get to the rest after I change my undies.

 

Thanks again brother. Awesome job!!

Edited by SnyderHealth

Share this post


Link to post
Share on other sites

Well, thats good, i hope it helped you. I looked at the page it looks good, Although getting the information from the products_description and wrapping it is a good idea, in this case and my case my description are in point form, and i dont like the chances of getting the script to write it in a sentence trying to sell the product..LOL

Well im glad i helped...

 

I was just surfing through and noticed that there was once before a simular contribution written for creloaded. It gives the admin the ability to turn this mod on and off, so i am going to look into that and perhaps a few other little things i got up my sleve :D

Share this post


Link to post
Share on other sites

joma, thanks mate.

 

I am currently working on using your contribution.

 

Instead of going to try to enter new short descriptions for 500 odd products, I just wish to copy from my products_description field in the short_desc field.

 

Anybody know the SQL command to update field short_desc (in table 'products') from field products_description (in table 'products_description').

 

I know the command:

 

UPDATE table_name set field1 = field2

 

would make field1 equal to field2 in the same table, but do not know how to update from outside tables....can someone help me with this?

Share this post


Link to post
Share on other sites

Re: Products Short Description

 

Ok, got a question that I just can not seem to answer myself. I just installed this and it works great, BUT...

 

Now it wraps the model number column in the product listings. The code is being called from catalog/includes/modules/product_listing.php and I see that if you try and change it so that you can add NOWRAP to the <TD>, it causes ALL of the column to NOWRAP and that makes the short description scroll off your page.

 

Any fix to this?


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

gamer, can you copy and paste the sql satement you used for this, it would be good to know, so i can add it to my notes. Thanks

Share this post


Link to post
Share on other sites

What I did was the following:

 

Instead of trying to go and add short descriptions for all of my 500 odd products, I changed the 'short_desc' field to VARCHAR(200) from TEXT and then ran the following statement in phpmyadmin.

 

update products, products_description
set products.short_desc = products_description.products_description
where products.products_id = products_description.products_id

 

This statement copied the contents of the full product description in our new short description field, limiting it to 200 characters in total though.

 

This would leave some words cut off in the middle of the word, so I added something like:

 

'... <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . TEXT_MORE . '</a>'

 

and defined TEXT_MORE in the language file so that the short description now looks something like this:

 

This product is great and you should buy it, ecetera and it is fabulou... more >>>

 

Now for every new product you add to your store, you can simply just add a short description when adding the product and this has saved you from trying to add a short description to every product.

 

Enjoy and thanks a ton to Joma!!!!!!

Share this post


Link to post
Share on other sites

joma, I seem to have a problem with the changes your contrib makes to admin/categories.php.

 

If I try to take a product and choose COPY TO, then the next option is to say whether you want to duplicate or link the new copied product, if I choose the DUPLICATE, I get the following error:

 

1136 - Column count doesn't match value count at row 1

 

If I choose to link to a different category there is no error, but if I duplicate to the same category, the error occurs.

 

Any idea's?????

Share this post


Link to post
Share on other sites

I bet it is not including the short_desc column when copying. Check the code for that command and make sure it is added in there.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

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

×