Loaded Commerce Community

Banner


Board index » Web Design and Development » Contribution Garage

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Is it possible to convert capitalised letters to lowercase?
PostPosted: Mon Jan 18, 2010 8:37 pm 
Offline
CRE Addict
User avatar

Joined: Thu Sep 10, 2009 10:10 pm
Posts: 252
Location: Sheffield, South Yorkshire, United Kingdom
Hi All,

I'm looking around to see if it's possible to turn caps lock off within ANY Category naming and Product Listing Description / Product Name within my store / database. I am sure I have seen one before by accident on my net travels but can I track it down now I want it, can I heck like lol grrrr!

To see what I mean, please go to my store http://www.shopfullstop.co.uk and look how the Categories to the left hand side are capitalised.

Then also take a look at the product listing boxes (descriptions again fully capitalised) instead of the following;

a. COMMUNICATION main category should be viewed / read as “Communication”
b. 2 WAY RADIO sub category should be viewed / read as “2 Way Radio”
c. 4.8MM X 200MM RELEASABLE CABLE TIES PACK OF 100 product listing box description should be viewed / read as “4.8mm X 200mm Releaseable Cable Ties Pack of 100”

I appreciate this is in part due to that's the way my product data feeds are pulled in from the distributor I use but I'd like to see if anybody has heard of a contribution / extension to solve this kind of issue.

_________________
Regards,
Rob

Newbie Cre Loader - Running Version: CRE Loaded PCI Pro v6.4.0.a

http://www.shopfullstop.co.uk We Offer It, You Buy It!


Top
 Profile  
 
 Post subject: Re: Is it possible to convert capitalised letters to lowercase?
PostPosted: Mon Jan 18, 2010 9:50 pm 
Offline
CRE Expert

Joined: Thu Jul 13, 2006 12:00 am
Posts: 658
look in your templates infobox css file

Code:
.infoBoxContents .NameProd, .Left_infoBoxContents .NameProd, .Right_infoBoxContent .NameProd {font:11px/13px Tahoma; color:#000000; text-decoration:none; font-weight:bold;text-transform:uppercase;}
.infoBoxContents a.NameProd, .Left_infoBoxContents a.NameProd, .Right_infoBoxContent a.NameProd  { font:11px/13px Tahoma; color:#000000; text-decoration:none; font-weight:bold;text-transform:uppercase;}
.infoBoxContents a.NameProd:hover { font:11px/13px Tahoma; color:#000000; text-decoration:none; font-weight:bold;text-transform:uppercase;}


see this part??

Code:
font-weight:bold;text-transform:uppercase;


text transform to uppercase

** that may not be the exact spot, but you can see what I mean about the text transform to upper case

_________________
Regards,

------------------------------------------------------------------------
Kirk Osburne

CRE everything
WebGraphicsSource.com
------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: Is it possible to convert capitalised letters to lowercase?
PostPosted: Wed Jan 20, 2010 1:47 pm 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 352
I think in this case you could try the following:

Open up the categories file you are using, it may be in the templates/default folder or templates/maintemplate/boxes/ folder in your case.

Find the following:

<?php
$aa = 0;
$info_box_contents = array();
$info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_CATEGORIES4 . '</font>');
new $infobox_template_heading($info_box_contents, '', $column_location);
$categories_string4 = '';
$categories_query = tep_db_query("SELECT c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c,
" . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE c.parent_id = '0'
and c.categories_id = cd.categories_id
and cd.language_id='" . $languages_id ."'
ORDER BY sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$foo[$categories['categories_id']] = array('name' => ($categories['categories_name'])),
'parent' => $categories['parent_id'],
'level' => 0,
'path' => $categories['categories_id'],
'next_id' => false
);

and add change to this:

<?php
$aa = 0;
$info_box_contents = array();
$info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_CATEGORIES4 . '</font>');
new $infobox_template_heading($info_box_contents, '', $column_location);
$categories_string4 = '';
$categories_query = tep_db_query("SELECT c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c,
" . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE c.parent_id = '0'
and c.categories_id = cd.categories_id
and cd.language_id='" . $languages_id ."'
ORDER BY sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$foo[$categories['categories_id']] = array('name' => ucwords(strtolower($categories['categories_name'])),
'parent' => $categories['parent_id'],
'level' => 0,
'path' => $categories['categories_id'],
'next_id' => false
);

That will sort out your Main Catergory names to Capital First Letter and the rest Lowercase..


Now.. look a little further down the code and find this:

if ($cPath) {
$new_path = '';
$id = split('_', $cPath);
reset($id);
while (list($key, $value) = each($id)) {
unset($prev_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
$category_check = tep_db_num_rows($categories_query);
if ($category_check > 0) {
$new_path .= $value;
while ($row = tep_db_fetch_array($categories_query)) {
$foo[$row['categories_id']] = array('name' => $row['categories_name'])),
'parent' => $row['parent_id'],
'level' => $key+1,
'path' => $new_path . '_' . $row['categories_id'],
'next_id' => false
);


And replace with this:

if ($cPath) {
$new_path = '';
$id = split('_', $cPath);
reset($id);
while (list($key, $value) = each($id)) {
unset($prev_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
$category_check = tep_db_num_rows($categories_query);
if ($category_check > 0) {
$new_path .= $value;
while ($row = tep_db_fetch_array($categories_query)) {
$foo[$row['categories_id']] = array('name' => ucwords(strtolower($row['categories_name'])),
'parent' => $row['parent_id'],
'level' => $key+1,
'path' => $new_path . '_' . $row['categories_id'],
'next_id' => false
);


That will do the same for the sub_categories...

_________________
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Board index » Web Design and Development » Contribution Garage

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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 Mon May 21, 2012 8:10 pm
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Forums Latest Activity

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

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