Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Description in Product Listing v.2


Paul_C

Recommended Posts

(based on the 9/1 snapshot; original mod by John Poynton)

 

This mod displays a truncated product description in the product listing underneath any other info you've decided to show there (manufacturer, price, model, etc.) with the exception of the product image. The product image will span both rows if it and the description are both present.

 

It'll display at most however many characters you tell it to in the admin, but instead of splitting up a word it will backtrack until it finds a space character to truncate the description at. All html is stripped out (except for the following tags: <a><b><em><font><i><s><span><strong><sub><sup><u>) to make sure block level elements do not completely destroy the product listing. And finally, an ellipses (...) is added to the end of the description if part of the description was actually cut off.

 

Hope all that made sense

 

Find it here

"It's a damn poor mind that can only think of one way to spell a word."

-- Andrew Jackson

Link to comment
Share on other sites

It's currently only up on my development server, but I suppose you can take a look at it if you like :) http://mrgone4662.dns2go.com/osc/default.php?cPath=21

 

It'd be nice if we could post screenshots here (wink wink).

"It's a damn poor mind that can only think of one way to spell a word."

-- Andrew Jackson

Link to comment
Share on other sites

Hehe

 

Hint hint indeed. :D

 

Thanks for that Paul.

I will do the same and have go on my test server.

 

I dont suppose you have tried integrating this with the Featured Products Contribution have you?

 

It would be nice to be able to have product description on the main page with either the Products of the Month or Featured Products, which ever you use.

 

CC.

Link to comment
Share on other sites

I think I also forgot to say...

 

Nice cows.

 

Do I get discount if I buy a dozen?

And what are we looking at on shipping costs? Cos those blighters cant be cheap!! :wink: :lol:

Link to comment
Share on other sites

You want a discount?!? $0 isn't good enough for you?!!!

 

By the way, I'm constantly tweaking things so there is a slight difference with what you saw there and what is in the contribution. If you care to make the same change find lines 134 and 139 in catalog/includes/modules/products_listing.php and adjust as follows:

change line 134 from:

 $lc_text = ' ' . osc_trunc_string(strip_tags($listing_values['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . ' ';

to:

 $lc_text = osc_trunc_string(strip_tags($listing_values['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), PRODUCT_LIST_DESCRIPTION_LENGTH) . ' ';



and line 139 from:

 $lc_params = 'colspan="' . $col_to_span . '" ';

to:

 $lc_params = 'colspan="' . $col_to_span . '" valign="top" ';

 

And I haven't tried integrating it with anything else yet, I just wrote this last night. Will have a look at the Products of the Month and Featured Products (once I install it), though I doubt it'll be too soon. Next in line (I think) is to rewrite the Reviews Listing page to actually show the reviews and possibly change the "Number of times read" feature into a "Was this review helpful to you?" type functionality.

"It's a damn poor mind that can only think of one way to spell a word."

-- Andrew Jackson

Link to comment
Share on other sites

Excellent!

 

I was only speaking about this yesterday to one of our guys, where the reviews section should take you to a list of full reviews and not just a list of reviews you can click on.

 

I think many will be to lazy to want to click to read one, then go back, then click the next and so forth...

 

I know I wouldn;t do it that way, but I know that I do read reviews users write when they are all listed on one page.

I hope I am on the same line of thinking as you Paul, if not set me straight.

 

If you need any assistance in creation give me a shout.

 

$0.00 is never cheap enough for me, I have always been a shrewd business man! :D

 

CC.

Link to comment
Share on other sites

Well, if you're big on reviews you might like a different mod I submitted http://www.oscommerce.com/downloads.php/co...ions,459/type,3

 

It puts product reviews on the product description page. (And since you must see things first, and we have YET achieved the ability to post screenshots, you can preview it at http://mrgone4662.dns2go.com/osc/product_i...&products_id=29 )

"It's a damn poor mind that can only think of one way to spell a word."

-- Andrew Jackson

Link to comment
Share on other sites

On that one Paul, I am one step ahead.

 

I have had this on my site for about a week.

 

It is one of the best features I have added yet, and may I say thanks for your hard work on that.

It is an excellent addition to my site, one which I hope will reap rewards for my business and the OSC community.

 

CC.

Link to comment
Share on other sites

I like the idea of this mod a lot. However for some displays. e.g. sideboxes, and my product listing in columns it would mess up the display to have the desciption underneath.

 

What I thought of doing, and maybe something you could add to other boxes, is to make the ALT text, your short description, takes up no screen real estate.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Ooooh.

 

While we are on the subject of that contribution.

 

Do you know how I can alter that script to allow more than 5 reviews on one page at a time?

I would like to make this about 10 before it archives them, so to speak, because I dont like the formentioned list you then have to trawl through to see the next 10 or so reviews.

 

Thnx again

 

CC.

Link to comment
Share on other sites

Hi Ian

 

I thought about this too, however my grand masterplan (If I may be so bold!) is to make this work similar to how they have done on the spotit.com.au site on their main page here:

 

www.spotit.com.au

 

I think that looks excellent and also drags customer attention to the product far more than just a single image.

 

what are your thoughts on this type of layout.

 

BTW - I do not size my OSC site to say 750 width, so the whole page is my canvas.

 

CC.

Link to comment
Share on other sites

Ooooh.

 

While we are on the subject of that contribution.

 

Do you know how I can alter that script to allow more than 5 reviews on one page at a time?

I would like to make this about 10 before it archives them, so to speak, because I dont like the formentioned list you then have to trawl through to see the next 10 or so reviews.

 

Thnx again

 

CC.

 

If you're talking about the reviews on the products description page then you should be able to just put whatever number you like in the admin section under Maximum Values.

"It's a damn poor mind that can only think of one way to spell a word."

-- Andrew Jackson

Link to comment
Share on other sites

I've always liked the spotit site (it is after all an osc featured site) any contribution that can help in achieving a more customised, and focused front page is more than welcome.

 

??? Why haven't they contributed their news system ???

Trust me, I'm an Accountant.

Link to comment
Share on other sites

I dont think I have ever seen them offer a contribution.

However I could be wrong, I sometimes am you know. :wink:

 

I have created a News section for my site based on the cafelog.com b2 blogger.

It has a nice admin side to it aswell, with a WYSIWYG editor to boot.

 

It has it's own news.php page and also integrates with the main page for new headlines.

 

My trouble is I dont know how to put down in writing how I did it.

I am not very methodical when it comes to things like that.

 

Any suggestions on the best way to write a contribution for this, I'm sure many would appreciate it.

 

CC.

Link to comment
Share on other sites

Use something like Beyond Compare to find out where your stuff differs from the current releases then just write down the differences. The database stuff may be a little trickier if you've altered it, but shouldn't be too hard to figure out.

"It's a damn poor mind that can only think of one way to spell a word."

-- Andrew Jackson

Link to comment
Share on other sites

The best way is to look at how others have made contributions. What I normally do is recreate the oscommerce directory structure, and place all the files I have changed into this.

 

Some people just list the actual code changes tthey have made. I have installed a number of mods of this type, however I would wish that they had include the altered files as well as this allows people who have knowledge of cvs to use it to simplify the task.

 

For example, lets say your mod just involves some alterations to admin/categories.php. In your readme file you would list which lines need to be changed. This is fine as far as it goes, but if you also include your altered categories.php in the download us cvs junkies would appreciate it even more.

 

Last but not least always include a gpl licence file.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

though this is off subject -----

if anyone would like to talk about the algorythm for the category tree I would be open to doing the code for the dropdowns like spotit uses .. though I don't know if I can contribute the javascript they are using to the contribution section. I have it done for root - sub but the whole tree I hate to say is escaping me ..

(my knowledge is so small you would think that an ant was a genius in comparison)

Link to comment
Share on other sites

the mm I downloaded from the netscape sponsored site worked ok except there was a bug in it when you went to multiple sub-categories. I forget what it was exactly.. they are all so different in how they act. :D

(my knowledge is so small you would think that an ant was a genius in comparison)

Link to comment
Share on other sites

My trouble is I dont know how to put down in writing how I did it.

I am not very methodical when it comes to things like that.

 

Any suggestions on the best way to write a contribution for this, I'm sure many would appreciate it.

 

Given the amount of interest in this particular feature, I'm sure people would be more than glad to take a draft of your contribution and give you feedback. I most certainly would. As it is, I'm starting with a recent version of the CVS tree and making all the mods I need, since I've gotta integrate the PayPal IPN contrib sooner rather than later. I'd definitely be in a position to work off your instructions :-).

 

Cheers.

Link to comment
Share on other sites

Harald Wrote:

There is a cross browser DHTML menu solution available at Milonic.

 

I do indeed like this script creator, they are even developing it to work online now, but it does take a little time. But at least it is better than having to pay huge amounts of cash for similar stuff that others offer.

 

Jason V Wrote:

Given the amount of interest in this particular feature, I'm sure people would be more than glad to take a draft of your contribution and give you feedback. I most certainly would. As it is, I'm starting with a recent version of the CVS tree and making all the mods I need, since I've gotta integrate the PayPal IPN contrib sooner rather than later. I'd definitely be in a position to work off your instructions .

 

Ok I have never put together a contribution as yet.

I am not very methodical in that way, more kinda radical! I just have a go and bodge it, and hey presto! It works. :lol:

Needless to say Backup is my best friend!

 

I will go through it again and do my best for ya.

Dont hold your breathe tho please, it may take sometime.

Link to comment
Share on other sites

Bless you Paul ...

 

I have been trying to psych myself up to write something like this and could not decide the smartest and least painful method ... then figured strip the description, but how much and how and not break things etc.

 

Thanks for a neat Add-On :lol:

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