How to change HTML of "Shipping & Handling" line on cart page - magento

In the shopping cart page of my magento store, there is a line item for Shipping & Handling. I am trying to change the HTML output of this line. I have figured out how to change the actual text "Shipping & Handling - Method" , but I would like to change the actual HTML output. I looked through all of my theme files and could not figure out where to access this. I simply need to add a CSS class for that line so I can style it. Any ideas?
Thank you.

An easier solution to take if you are not a developer is to update the translation of that line of text in your translation file /app/locale/en_US/Mage_Checkout.csv if it isn't already in there just add a line at the end. The first part is what the text currently is and the second is what you want it to read.
tread lightly, it effects that line of text anywhere on your site.
If you just need to style some text add the html of that section and I can help you with a selector.

The file you are looking for is app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php you will
$title = Mage::helper('sales')->__('Shipping & Handling');
Under fetch(Mage_Sales_Model_Quote_Address $address) function and around 20th line. There you can change but editing magento core file is not recommended. So you have two solutions
Copy Shipping.php file in to local code pool and edit there
This is the best way create your own module for override Shipping.php file by extending Mage_Sales_Model_Quote_Address_Total_Shipping class you can find a tutorial of creating module at steve perrys' blog

Related

Magento: change link from cart

I have Magento 1.7 installed, I have this theme called ves_gift, at the end of the Checkout (before clicking "checkout" actually) I have the terms of agreement:
The checkbox contains a link connected to the "privacy terms".
The point is that is a wrong/broken link, and I need to change its href, how do I fix it?
Also the word "Aaccetto" should be with one A only, not double. "Accetto" is the right word. Where is the translation file for that?
You need to find the template where the HTML contents of the checkbox. Then you can modify as per your wish.
Try installing Magento-Debug from magentocommerce, and find the template being used.
If you want to translate, then use the CSV file for translation in your theme, as per your language rather than hard-coding in Phtml files.
Remmeber : only Html strings echoed with $this->__('MYSAMPLETEXT'); can only be translated. So, in the CSV file you could do
MYSAMPLETEXT,MYTRANSLATEDTEXT
and then magento will translate the string for you, as simple as that.
file path:-
app\design\frontend\default\your-theme\template\checkout\onepage\agreements.phtml
if its work vote for me, and not let me know...
Thanks
Ravi

Is it possible to change text directly in the code

I would like to know if there is a way to change text in the code instead of using the admin panel? I have Filezilla installed and can access my site/files from there.
If I use the inspect element in any browser, I can see an HTML structure, but as I have understood there is no HTML document in Magento, right? So where do I go if I want to make a change to a text element on my site and I don't want to use the admin panel?
Most of the text elements are handled by Magento's language translation system.
Quite often, you don't have to mess around hacking templates, just simply add a line to the translation CSV with the text string exactly as it appears, add a comma and then the new text string you want Magento to display.
For example, if you're working with US English, you can use the following file in your own custom template package as follows:
app/design/frontend/default/your_package/locale/en_US/translate.csv
Let's for example, change one of the window shade bar titles in the One Page Shopping Cart. Add a line to translate.csv as follows:
"Billing Information","Billing Address Information"
How this works, in the template the following line normally displays the title:
<?php echo $this->__('Billing Address') ?>
This code snippet $this->__('Billing Address') is a call to Magento's language translation system. It reads the translate.csv file finds Billing Address and changes it to Billing Address Information when it assembles the page html.
Lotta people out there have made changing text like this far harder than it has to be.
Hunting down the proper template, changing the text, finding the template got messed up, or trying to remember after the fact what was changed.
VS.
Changing a simple central file that contains all the text string translations... Often only by adding a new line to the file
Magento actually makes this very simple.
Thank you! So magento stores all text in .csv? or just the stuff that needs to be translated? I'm making a search for .csv via Filezilla but I only get two languages (the site is translated to multiple languages). Should I be looking somewhere else?

How to change Related product title block in Magento

Want to know, how can i change the block title of Related product block in magento? I mean that, i want to replace the title named "Related product" with my own text.
Thanks
Mostaq
Hello check below file
app/design/frontend/base/default/template/catalog/product/list/related.phtml or
app/design/frontend/your_current_theme/default/template/catalog/product/list/related.phtml
Hope this help you.
After GO to Your related page and see the red line with book
icon to click on it and replace your text without Going To file System.
For Backend Related Product Tab Label Change for
1) direct change on core file:
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
find Related and replace
2)Create Module to dynamic :
http://stackoverflow.com/questions/16481564/where-to-change-magento-default-tabs-on-products

Magento edit shopping cart title in header

I have a Magento webshop and in my header is standing: Shopping cart - Subtotaal winkelwagen
I was looking for a way to edit this text. I have looked into the .php files etc. but i didn't found anything there so far. I hope someone can tell me where i can edit this text.
The best way is as erwin_smit described it.
As an addition the fastest solution is by using the inline translation Tool under
System->Configuration->Developer->Inline Translation
After activation reload your Front-end and edit the dotted text.
That's probably somewhere in app/design/frontend/packagename/templatename/checkout/cart.
If not, try to switch on the template hints on.
You can also replace text using a translate file. Place a file called "translate.csv" in app/design/frontend/{packagename}/{templatename/locale/{languagecode}/
Hope this helps.

Magento Not Translating Wishlist Product Name and Description

I have a developmental Magento Store I'm setting up with two languages. Everything works perfect except the SideBar Wishlist and the "My Account" Wishlist displays the Spanish option no matter what. Everything switches i.e. the "My Wishlist" title header, even the email to friend box that automatically writes in "Please, enter your comments..." changes correctly. But the product name and discription remians in Spanish. I've tried this suggestion here: Wishlist donĀ“t capture store views lenguage
Has anyone figured out how to fix this or what I might have set incorrectly?
Thanks
I had this problem as well on Magento 1.6.2CE. - while switching store languages product names remain in default language.
On a file Wishlist\Model\Item.php arround line 319 you need to remove the line of code:
public function getProduct()
{
$product = $this->_getData('product'); // <-- remove this line
The $product object is reloaded again with the correct store filter.
I don't really understand the scenario, but based on your title I had came up with this.
By any chance, did you manually code the text on a HTML block?
I have came across with this problem, and what I did is find the code snippets where the text is being called. There I changed it with the code below, instead of directly using the text itself. Hope that it makes sense.
<?php $this->__('Customers'); ?>

Resources