I have created a template in Magento and have added some configurable products. When you select the drop down, the change in price is displayed (eg +6) and this is reflected in the shopping cart.
However, I would like it to upadte the regular and special price on the product page. Is there a way to do this, or is it static html?
Cheers
http://www.titan.x-brand.co.uk/bath-panels/trojan-supastyle-750mm-acrylic-end-panel.html
Price and special price html is not hadr coded - it is changed by javascript Product.OptionsPrice (declared in app/design/frontend/base/default/template/catalog/product/view.phtml)
var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
Implementation of the class is in javascript file js/varien/products.js
The function that should change the price is Product.OptionsPrice.reload
That JS object expects your price and special price html elements to be in certain hierarchy (
<span><span>...</span></span>
this is only an example what I mean by hierarchy) and the elements of this hierarchy must have certain class and id attributes that should not be removed or renamed.
Your changes to phtml files have caused this code to fail (if you inspect your page with firebug you'll notice that there are javascript errors present - not necessarily related to this issue but you should fix them).
The easiest way to start fixing this is that you copy the section of html, related to price, from default phtml file and reapply css once it works.
Also if you have changed the theme through admin (System->Configuration->Design->Package->Current Package Name) you could change it from 'your_theme' back to 'default' and see how it is supposed to work.
Related
We are using HTML tags in our options on products. The problem is, that the HTML is shown in the order confirmation email.
where can I find the PHTML file to change the option items?
app\design\frontend\our-template\default\layout\sales.xml
app\design\frontend\our-template\default\template\sales\order\items.phtml
I thought this would be the right files but nothing changes.
The template sales\order\items.phtml renders everything around the order items.
As you can see inside it there is this line <?php echo $this->getItemHtml($_item) ?>. That one renders the item row itself.
And the template for each item depends on the product type.
These are the templates used:
email/order/items/order/default.phtml - for simple, configurable and virtual products (grouped products are rendered as simple products).
bundle/email/order/items/order/default.phtml - for bundle items.
downloadable/email/order/items/order/downloadable.phtml - for downloadable items.
If you want to change the way the items look in invoices shipments and creditmemos you will find the templates in the same place. Just replace the folder order with the entity type (invoice, shipment, creditmemo).
Im wanting to add the Brand name (or designer name in this case which i have made a new attribute for) just above the product description in the Category view (grid) but cant figure it out.
As its Magento Go i have no access to the code, other than XML updates for the category itself.
Ive looked everywhere and would value any help.
Thanks
If you are cant get to the template phtml codes, you can put it on by admin.
Open catalog / attributes / manage attributes, find your attribute and in the properties set to
Visible on Product View Page on Front-end
Used in Product Listing
But it will not be on position you want.
You can edit CSS for the template and set an absolute position for your attribute.
Next way is to add in the admin in category XML layout, but this you need to do for each category. (Custom Layout Update)
Sorry for asking for very basic question. Actually i am very new to magento hence couldn't find the solution..Here is the question:
I have a magento ecommerce website and i want to edit the product template of the website.
I have both magento and FTP credentials. But not able to figure out where is the actual product template.
in which folder i have to look for the product template file?
I want to append some HTML to each product page hence i am looking for it.
Please Advise.
Hope to get some help.
Regards,
Rich
The best way to debug this type of issue when new to magento is to "Turn on Template Path Hints"
Log into the admin
Goto -> System ->Configuration, and on the bottom of the list select “Developer”
click on Debug – you will only see “Profiler”. Here is the trick – you have to switch the “Current Configuration Scope:” [in the upper left] to a website instead of default. Select “Main Website”.
Now you will see the selection for Template Path Hints – check yes. This will display the path of the template for each block of the page so you can find stuff! You can also choose to “Add Block Names to Hints” to see the corresponding model class for the block.
Which going to point you to app/design/frontend/[theme]/default/template/catalog/product/*
Read more # http://www.redlightblinking.com/blog/magento-debugging-how-to-debug-template-paths-logging-and-display-errors
In addition to the previous answer make sure to disable the cache otherwise you might not see the results right away.
The Product page has many files attached but mainly the most importants, in my opinion, areI
the media.phtml that controls the size of your mage, more views, etc then you have the
the upsell.phtml that call the upsell products and
the view.phtml that combine all these files.
You can find them at
app/design/frontend/base/default/template/catalog/product
app/design/frontend/base/default/template/catalog/product/view
Copy these files and paste them in your theme directory. DO NOT OVERRIDE THEM! and also keep in mind you have: single product, configurable product, etc so you'll have to edit those files as well if you need!
Hope this helps and any feedback from other users is always appreciated.
I have a Magento e-commerce website and I want to edit the product template of the website. I have both Magento and FTP credentials. But not able to figure out where is the actual product template. in which folder do I have to look for the product template file, I would like to edit my product by adding some code. I found this folder in FTP /public_html/app/design/frontend/ET/base/Magento_Catalog/templates/product/view/productlabels.phtml
I edit some code
unit price :
<script type="text/javascript">
$(document).ready(function() {
var Quantity = document.getElementById("qty").value;
var UnitPrice = document.getElementById("options[4]").value;
var vUnitPrice = vUnitPrice / vQuantity;
vUnitPrice = $("#vUnitPrice ").val(total2.toFixed(2));
document.write(vUnitPrice);
}
</script>
but nothing changes, help me please
We are using the Magento module DerModPro_BCP (Betterconfigurable Products).
We have configurable products based on simple products. Some of these simple products have related products.
When selecting a configuration option, the related products of the assigned simple product should be loaded.
What is the right approach to add blocks to reload when changing options?
The extension renders the full simple product during the AJAX request and extracts the necessary data via Xpath queries from the generated HTML. Then it sends this data to the browser where CSS queries are used to replace the content in the page
Create a new module with a following config.xml
In the node global/bcp/update_selector_list add a new node <related />
In default/dermodpro_bcp add <update_related_.... entries to defined the Xpaths and CSS paths
In addition, catalog/product/list/related.phtml has to be modified in your theme to contain an empty <div> as a placeholder, if no related products are defined.
I have a magento template which has placed some static blocks on the product view pages. I have created some additional product attributes such as "product compatibility" for example, and would like to display this product attribute within a static block on the product page. That is, for each product you look at, the product attribute content will be different, but the position on the page will be the same because its within the static block.
I have tried using a tag such as
{{block type="core/template" template="catalog/product/compatibility.phtml"}}
within my static block, but it does not seem to do anything all and just displays that code on the frontend. I have turned off the wysiwyg for the editor(s), and have created a file named compatibility.phtml and just filled it with the test php code of:
<?php echo 'I am working!' ?>
I dont know if getting it to look t a file like this is even needed at all in order to grab the product attribute data though.
Is this even possible?
Is possible but is a little bit complicated, if you are not a developer, besides any custom attribute can be displayed on product view pages without any static block in Additional Information section. You only need to create attribute, set "Visible on Product View Page on Front-end" to Yes and assign that attribute to an "Attribute sets".