Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I need Products Names standard Case and not UPPERCASE


Guest

Recommended Posts

Posted

Hi,

 

I submitted a feed to Google Merchants and they rejected it saying that the reason was Overuse of capital letters. I obviously went to the stylesheet.css and commented out "text-transform:uppercase;" under ".NameProd {" and that didn't work. I then went to the admin section and discovered that ALL of the 1750 product names were inputted in ALL CAPS. The woman who loaded the catalog copy/pasted this information from the drop shipper which is also in ALL CAPS.

 

Is there a way to correct this without manually correcting all 1750 products by hand so that Google will accept the feed?

Posted

Hi,

 

I submitted a feed to Google Merchants and they rejected it saying that the reason was Overuse of capital letters. I obviously went to the stylesheet.css and commented out "text-transform:uppercase;" under ".NameProd {" and that didn't work. I then went to the admin section and discovered that ALL of the 1750 product names were inputted in ALL CAPS. The woman who loaded the catalog copy/pasted this information from the drop shipper which is also in ALL CAPS.

 

Is there a way to correct this without manually correcting all 1750 products by hand so that Google will accept the feed?

 

You can try this one:

1. Make your database backup

2. insert a code below to the notepad and save it as e.g. uppercase.php

<?php

require ('includes/application_top.php');


$wynik = mysql_query("SELECT * FROM products_description") 
or die('Error'); 


if(mysql_num_rows($wynik) > 0) { 
   echo "<table cellpadding=\"2\" border=1>"; 
   while($r = mysql_fetch_assoc($wynik)) { 
       echo "<tr>"; 
       echo "<td>".$r['products_name']."</td>"; 
     $w=strtoupper($r['products_name']);
  $id=$r['products_id'];
       echo "<td>". 
     $w
      ."</td>"; 
       echo "</tr>"; 

$result = mysql_query($query);
$sql_query = mysql_query("UPDATE products_description set products_name='$w' where products_id ='$id'") or die (mysql_error());

   } 
   echo "</table>"; 
} 

?>

3. copy your uppercase.php to main catalog of you osCommerce

4. go to url http://www.your_domain.com/uppercase.php

5. ready, all names of your products changed to uppercase

6. delete file uppercase.php from your store catalog

 

I hope it will help, don't forget to make database backup first.

Posted

You can try this one:

1. Make your database backup

2. insert a code below to the notepad and save it as e.g. uppercase.php

<?php

require ('includes/application_top.php');


$wynik = mysql_query("SELECT * FROM products_description") 
or die('Error'); 


if(mysql_num_rows($wynik) > 0) { 
   echo "<table cellpadding=\"2\" border=1>"; 
   while($r = mysql_fetch_assoc($wynik)) { 
       echo "<tr>"; 
       echo "<td>".$r['products_name']."</td>"; 
     $w=strtoupper($r['products_name']);
  $id=$r['products_id'];
       echo "<td>". 
     $w
      ."</td>"; 
       echo "</tr>"; 

$result = mysql_query($query);
$sql_query = mysql_query("UPDATE products_description set products_name='$w' where products_id ='$id'") or die (mysql_error());

   } 
   echo "</table>"; 
} 

?>

3. copy your uppercase.php to main catalog of you osCommerce

4. go to url http://www.your_domain.com/uppercase.php

5. ready, all names of your products changed to uppercase

6. delete file uppercase.php from your store catalog

 

I hope it will help, don't forget to make database backup first.

 

Sorry I made a mistake the code above is to change lowercase to uppercase, to make it lowercase use:

<?php

require ('includes/application_top.php');


$wynik = mysql_query("SELECT * FROM products_description") 
or die('Error'); 


if(mysql_num_rows($wynik) > 0) { 
   echo "<table cellpadding=\"2\" border=1>"; 
   while($r = mysql_fetch_assoc($wynik)) { 
       echo "<tr>"; 
       echo "<td>".$r['products_name']."</td>"; 
     $w=strtolower($r['products_name']);

         $id=$r['products_id'];
       echo "<td>". 
     $w
      ."</td>"; 
       echo "</tr>"; 

$result = mysql_query($query);
$sql_query = mysql_query("UPDATE products_description set products_name='$w' where products_id ='$id'") or die (mysql_error());

   } 
   echo "</table>"; 
} 

?>

 

to make first letter uppercase use:

<?php

require ('includes/application_top.php');


$wynik = mysql_query("SELECT * FROM products_description") 
or die('Error'); 


if(mysql_num_rows($wynik) > 0) { 
   echo "<table cellpadding=\"2\" border=1>"; 
   while($r = mysql_fetch_assoc($wynik)) { 
       echo "<tr>"; 
       echo "<td>".$r['products_name']."</td>"; 
     $w=strtolower($r['products_name']);
  $w=ucfirst($w);
         $id=$r['products_id'];
       echo "<td>". 
     $w
      ."</td>"; 
       echo "</tr>"; 

$result = mysql_query($query);
$sql_query = mysql_query("UPDATE products_description set products_name='$w' where products_id ='$id'") or die (mysql_error());

   } 
   echo "</table>"; 
} 

?>

 

sorry for mistake, english is not my first lanuage

regards

Posted

You can try this one:

1. Make your database backup

2. insert a code below to the notepad and save it as e.g. uppercase.php

<?php

require ('includes/application_top.php');


$wynik = mysql_query("SELECT * FROM products_description") 
or die('Error'); 


if(mysql_num_rows($wynik) > 0) { 
   echo "<table cellpadding=\"2\" border=1>"; 
   while($r = mysql_fetch_assoc($wynik)) { 
       echo "<tr>"; 
       echo "<td>".$r['products_name']."</td>"; 
     $w=strtoupper($r['products_name']);
  $id=$r['products_id'];
       echo "<td>". 
     $w
      ."</td>"; 
       echo "</tr>"; 

$result = mysql_query($query);
$sql_query = mysql_query("UPDATE products_description set products_name='$w' where products_id ='$id'") or die (mysql_error());

   } 
   echo "</table>"; 
} 

?>

3. copy your uppercase.php to main catalog of you osCommerce

4. go to url http://www.your_domain.com/uppercase.php

5. ready, all names of your products changed to uppercase

6. delete file uppercase.php from your store catalog

 

I hope it will help, don't forget to make database backup first.

 

 

Thank you but I think you misunderstood. Everything is already all uppercase. that's the problem. Everything is ALL CAPS. I need them lowercase except for the first letter of the sentence.

Posted

Thank you but I think you misunderstood. Everything is already all uppercase. that's the problem. Everything is ALL CAPS. I need them lowercase except for the first letter of the sentence.

 

 

I don't know why it isn't working. Here are the pages you wrote:

http://www.pamperedpetsstore.com/uppercase.php'>http://www.pamperedpetsstore.com/uppercase.php

http://www.pamperedpetsstore.com/alllowercase.php'>http://www.pamperedpetsstore.com/alllowercase.php

http://www.pamperedpetsstore.com/1stletteruppercase.php'>http://www.pamperedpetsstore.com/1stletteruppercase.php

 

The website is: http://www.pamperedpetsstore.com/

 

I DID backup the database just before I tried this.

 

My goal is to use standard case. No ALL CAPs at all anywhere.

Posted

Thank you but I think you misunderstood. Everything is already all uppercase. that's the problem. Everything is ALL CAPS. I need them lowercase except for the first letter of the sentence.

 

 

 

You've been such a big help. May I PM you with FTP info?

Posted

You've been such a big help. May I PM you with FTP info?

 

Yes you can send me FTP details I can help you with it.

 

I sent you 3 different ways in this post

1. to make all products names uppercase - SAMPLE PRODUCT NAME

2. to make all products names lowercase - sample product name

3. to make it like this - Sample product name

 

I think you made some mistake in copying my code because tested this on my online store and was working fine

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...