CRE Loaded Community

Banner


Board index » Loaded Commerce Support » Install & Config

All times are UTC - 5 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Truncated Product Title on Homepage and Searches
PostPosted: Sat Jul 31, 2010 5:18 pm 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
Hi All,

Im having trouble trying to find out how to solve the following problem, being a no0b i've been scratching my head for a few weeks on and off lol

okay, on my homepage or search listing (actual product page is fine) the title of the product always has a "..." after it, either it is truncated as follows:

Prouct ABCDEFGHIJKLM -----> "Product ABCDE..."

or if the title is very short anyway it still does it after the full title like this:

Product ABC ------> "Product ABC..."

(without the quotation marks)

I want the full titles to be shown, and if that means going on to a second line - so be it.

It also does the same for the priduct description, which I don't mind as much, but I'd be really greatful If someone could let me know if they've had this problem, or how timmy-ish I am for not knowing.

Cheers,

Pete


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Tue Aug 03, 2010 11:18 am 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
i think the code may truncate the title if necessary and then add the ellipses (...) after.

I can't seem to find any code where this could be located! I know it's inside a table on the main page or in search results, but I have no idea where to find the settings that would allow me to show the full title.

Any help would be greatly appreciated guys


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Tue Aug 03, 2010 11:35 am 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
Are you using the default (CRE63_ats) template?

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Tue Aug 03, 2010 11:49 am 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
no, it's one from AlgoZone.

its called OS04A00418.

Not really much more I can say about it really, is there anywhere specific I should be looking?

Cheers,

Pete


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Tue Aug 03, 2010 12:45 pm 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
I thought so.. they will be using a function of there own to reduce the number of characters in the sentence... usually something like:
az_short_text(

Have a look for something silmilar in templates/OS04A00418/includes/modules/product_listing_col.php or product_listing.php and templates/OS04A00418/content/advanced_search_results.tpl.php

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Tue Aug 03, 2010 2:13 pm 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
Hi TheLango,

Thanks for helping,

I've had a look in those files and I can't find any reference to any az_ , short_name, short, parts of the code.

There is a line for the product description which looks as follows:

$listing[$x]['products_description'] = cre_product_short_description_template($listing[$x]['products_id'], '100');

Would the 100 here be the limit for the description? There is nothing similar for the product name / title.

what does the $x deal with?

Thanks,

Pete


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Tue Aug 03, 2010 6:16 pm 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
I have eventually found that bit of code you mentioned...

It was mapped into a file called templ_product_box.php.

It was under az_short_text.

I can now change the amount of text to be shown, but I cannot stop the ellipses from being shown afterwards!

The code is as follows:

div class="az_product_list_head">
<a href="<?= $product['info_url'] ?>"><?= az_short_text( $product['name'], 75) ?></a>
</div>


In the product listing it always has a ... after the name no matter how the text or how much text can be shown.

Any thoughts?

Also, the above worked for the searches and specials listing but not for the featured or new products sections - will there be similar code in these php files? I'll have a look now anyway.

Cheers,

Pete


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Wed Aug 04, 2010 3:05 am 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
Hi Pete,

You will need to find the function to remove/replace the ... it will be set there.. so look for function az_short_text( somewhere within your template folder.
is there an extra html file?

as for the featured/new products, I would assume the same az_short_text is there in the name/description also.

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Wed Aug 04, 2010 8:25 am 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
I can't seem to find an html file within the template folder.

It's really strange with the ellipses (...) as the same az_short_text is used for the product description to be truncated at 150 characters. However there is no ... after the description when shown on the main site. It doesn't seem as if the actual code for az_short_text is making the ... happen as if it did, then the description should be the same also.

The two codes for the product name and description are:


<div class="az_product_list_head">
<a href="<?= $product['info_url'] ?>"><?= az_short_text( $product['name'], 75) ?></a>
</div>

<div class="az_product_basic_info">
<div class="az_product_list_img"><a href="<?= $product['info_url'] ?>"><?= $product['image'] ?></a></div>
<div class="az_product_list_data"><?= az_short_text( $product['desc'] , 150) ?></div>
<div class="az_product_list_review"><?= $product['review_stars'] ?></div>
</div>



Do you have any idea what else this could be?
I know that in Firefox had an issue with CSS adding a ... to the overflow function but this problem also occurs on IE so i'm pretty confused by it!

what sort of code would you need to add to show an ellipses after text irrespective of how many characters that text contains? do you think the setting for this would be contained within my purchased template folders or in any other folders?

Thanks for you help

Pete


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Wed Aug 04, 2010 8:51 am 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
Pete,

Sorry, you should be looking for a php called extra_html_output.php within the template folder.

this is the function that Algozone use:
Code:
function az_short_text($text, $limit='20') {
   $str = strlen($text) > $limit ? substr(strip_tags($text), 0, $limit) . '&hellip;' : strip_tags($text);
    return $str;
}

the &hellip is the three ...

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Wed Aug 04, 2010 10:53 am 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
Hi,

I found that file but there i no reference to az_short_text at all. Could this piece of code be in a different file by any chance?

Thanks for you help this far, i feel like im so close to the end now! Just need to find where that code is hiding!

Cheers,

Pete


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Wed Aug 04, 2010 12:39 pm 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
Pete,

It could be in any of the files in the Algozone template folder.. sorry I cant be of more help without seeing the files.

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: Truncated Product Title on Homepage and Searches
PostPosted: Thu Aug 12, 2010 5:40 pm 
Offline
CRE Newbie

Joined: Sat Jul 31, 2010 4:51 pm
Posts: 30
Hi,

I've had a look in every .php and.css file in the Algozone Template folder and have searched for 'short_text' , '...' , and 'hellip' and have not found anything!

very confusing!

Could it be anywhere else in the folders?

would it be in an html .php?

Many Thanks,

Pete


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

Board index » Loaded Commerce Support » Install & Config

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Tue Feb 07, 2012 10:51 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

Follow Us on Twitter

An error occurred

Oops, an error seems to have occurred. We're sorry for any inconvenience this might have caused. If the error persists, feel free to tell us about it.

CRE Loaded Community Chat hosted by CRE Loaded.

Join now


Chat about what's on your mind. More about public chats.


© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy