I have just launched an online clothing site using magento 1.7.0.2. I would like to add “With Free Shipping” or an image after the price on both the product and catalogue pages. I have tried the advice given in previous articles but have not had any luck.
I am using the Mercado theme from 8theme but using the template path hints the price appears to be generated by frontend/base/default/template/catalog/product/price.phtml which I understand is a core magento file.
Despite this there is a short price.phtml in the Mercado theme directory. This file only contains the line <?php echo $this->getPriceHtml($_product, false, '_clone') ?>. I have added an echo command below this but this has had no effect (even after a cache refresh). I have followed advice on the magento forums regarding an addition to this file but this also have no effect on the frontend.
You can copy the file frontend/base/default/template/catalog/product/price.phtml into the folder for the Mercado theme, and edit it there. I don't know what the exact path is for the theme you are using, but the file should end up in a location like frontend/package/theme/template/catalog/product/price.phtml.
BTW, I found this site the other day. It has lots of useful resources. One of them is the Magento Design Guide - which has a good explanation of Magento's theme fallback model, among other things.
Related
I'm working on a big multisite + multitemplate (based on a same base-template) installation of magento 1.7, and have bumped into problem:
On a sub-domained template I don't know from where does magento take the list.phtml and view.phtml when it generates the pages with the list of products.
Can this be set-up per template, that it is hard-coded to get the list+view.phtml from the template\catalog\product\ path of the templates' app folder?
Thanks.
Gas
I found out, that it was the problem of the plugin used at other sub-sites (which replaced the list.phtml and view.phtml), but I deleted it on the working-site.
I've put the same plugin files also to the sub-site's template folder, and it finds the correct files now.
BR-:G
I have a problem with magento 1.7 (WYSIWYG).
My problem is that I can't have a proper description of the product when I use the WYSIWYG.
For example if I write in the WYSIWYG my product description, on site web site I will have a presentation which isn't the same.
The WYSIWYG puts html tags for each line return.
Thank you for your help
I've found in the past that with some themes the description is run through the nl2br function first. This will replace all new lines with <br> tags. Look in your view.phtml template file for this and remove the nl2br function.
It could be that you have custom css on the front causing it to appair different, view source both the admin (WYSIWYG) and on the website to see if the html are the same. If they are the same then check your custom css
In the file description.phtml in the template/easytabs folder, I removed the nl2br.
And then it works fine.
I've successfully installed Fishpig's Magento WordPress Integration extension. I followed the instructions where you install via Magento Connect and had no problems. This is by the way all on the development server which does not have Caching or Compiling enabled.
The Magento cart is installed in the webroot directory and WordPress is in subdirectory "wp" as stated in Fishpig's instructions. The Full Integration blog path is /blog.
PROBLEM:
When I visit the blog's page it is not using the Magento theme. I even set it to use the same layout (same as CMS's homepage) We have a custom Magento theme. Maybe there is something we are doing incorrectly Magento theme wise for Fishpig's extension not to work. Screenshots to come eventually but the host (DataGram) is down due to the flooding Downtown. Should be back hopefully today.
To clarify... WordPress is using its own database. In the Shop's admin panel->WordPress tab I setup Full Integration and set the path to "wp" and the blog path is blog.
So, now if I visit for example... example.com you are in the shop and if you visit example.com/blog you are in the fully integrated blog.
Bottom line is it seems to be configured fine in the admin panel. I am not requesting the blog page from the wp directory (I.E: example.com/wp) but from the fully integrated page (example.com/blog).
Our problem could be similar to what this person is experiencing:
Magento - FishPig Integration - Not getting correct template for /blog
Have a great weekend all!
Best Regards,
George
Huzzah looks like I got things working :-)
The culprit was that this file:
"app/design/frontend/default/eboost/layout/wordpress.xml"
^^ was pointing to the wrong template filename. Corrected and was good to go. Modified line was number 66.
Funny thing is that on the top of that XML file it states:
"
Option 1 - local.xml (recommended)
Create a file named local.xml in your custom theme's layout folder. You can then make changes to the layout there by
using the relevant layout handle. This allows you to leave this file intact and recieve new features
when upgrading the extension.
Option 2 - copy this file
Copy this file and it's contents to a new file in your custom theme's layout folder named wordpress.xml.
Each time you upgrade, you will need to check with your copy of the file and
the copy in app/design/frontend/base/default/layout/wordpress.xml for changes and merge any you find"
Now, as stated in my Original Posting I installed FishPig extension using their instructions: http://fishpig.co.uk/wordpress-integration/docs/installation-and-configuration.html
^^ Therefore I don't know why it is setup using Option 2. That wordpress.xml is in our theme's layout directory.
.
.
.
I feel I should also state the other changes I did even though it doesn't seem like it contributed to making it work. Just doing for completeness:
-- Renamed the subdirectory /wp to /wordpress and changed all references to dev.eboost.com/wp to dev.eboost.com/wordpress within the DataBase using http://interconnectit.com/124/search-and-replace-for-wordpress-databases/
-- Removed .htaccess from /wordpress folder
So bottom line is looks like it is working normally. We are now set for working on redesign for site.
--George
Have a look at this.
http://www.wellicious.com/gbren/wellblog
I also used Fishpig and it is working.
What do you mean by visiting the blog page? Do you request the blog page from the wordpress directory?
If so, it doesn't change its design.
You have to request the blog within your shop.
Can someone verify what I think is what's happening with Magento's fallback theme hierarchy.
The final fall-back point is the /base/default/ theme.
Within your interface/package (they are the same things right?), your default theme is selected at, from the Magento admin page, System->Configuration->General->Design->Themes->"B" ("B" is an example name of the theme).
On top of your default package theme, you can select an active theme from System->Design->"A".
So with this setup, Magento will look into "A" first, then in "B", then finally resort to base/default if neither A or B has files it needs.
Correct or no? TIA!
Sorta.
The fall-back hierarchy in Magento CE v1.4+ and EE v1.8+ is as follows.
Look for requested file in:
app/design/frontend/custom_package/custom_theme/
skin/frontend/custom_ package/custom_theme
If not found, look for requested file in:
app/design/frontend/custom_package/default
skin/frontend/custom_package/default
If not found, look for requested file in:
app/design/frontend/base/default
skin/frontend/base/default
If not found, a rendering error will occur.
Source: Magento's Theme Hierarchy - Changes in CEv1.4 and EEv1.8
I will do my best to clarify some points for you.
If you are not using a child theme, magneto will use /base/, however if you have a child theme active, magneto will use your custom theme files.
For example, If your new theme file has a header.phtml file but not footer.phtml, Magento will automatically fall back to the base. this is why its never smart to edit core files
My extremely simple build system for Magento needs to deploy some extension frontend code into the appropriate theme folder. But I don't know how to get it to find out which folder to put the files in at build time. Anyone know how to get this data out of Magento?
Put your code in the base/default theme (default/default prior to version 1.4, or both just to be sure) and it will be available to all themes thanks to inheritance.
Each store within Magento can set it's own theme so you might have more than one to consider. Also certain pages like CMS, category or product pages can choose their own theme to override the store and global settings.
To find the package and theme that corresponds to the folder app/design/frontend/PACKAGE/THEME use;
Mage::getStoreConfig('design/package/name', $storeId)
and;
Mage::getStoreConfig('design/theme/default', $storeId)
If calling from a PHP file external to Magento then you'll need to include 'app/Mage.php'; first. The $storeId value can be either an int as used internally or the store code saved in System > Configuration > Manage Stores - there is usually at least a "default" value.