I am wanting to show my prices in Magento with the current code in front of the price:
AUD $5.50
I can't seem to find a setting for this and I'm having trouble trying to find some code or a plugin to do this.
Any suggestions?
You can try free module Currency Manager
There is available currency symbol replace for every currency. Change "$" to "AUD $".
In app/design/frontend/YourInterface/YourTheme/template/catalog/product/price.phtml, find proper place(you should have many try :) )like this snippet code:
<span class="price-excluding-tax">
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
</span>
</span>
change
<?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
to
<?php echo 'AUD '.$_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
This will add 'AUD ' to all of the prices.
Related
We're running Magento 1.9.2.4
There are several simple products making up a few configurable products which we are wanting customers to be able to order if they are in stock or out of stock.
We're running custom themes and plugins, i've reverted back to RWD to ensure there are no template mistakes and disabled all of the plugins.
All options have been set globally, i've double checked the both the simple and configurable products to ensure that they are set with product levels and are in stock where applicable.
Cache has been cleared and all data has been re-indexed.
I've attached a screen shot of the settings.
https://www.dropbox.com/s/x96aqhh2h9b86ik/Screenshot%202017-02-14%2018.59.54.png?dl=0
I've read lots of threads and there appears to be a few people that have had this issue on different versions of Magento but none of the fixes appear to have worked.
I found the issue, the availability.phtm file needed updating to pull in another status.
There was an article I found online which helped, its not 100% right for 1.9.2.4 but got me most of the way there.
<?php $_product = $this->getProduct() ?>
<?php echo $this->getPriceHtml($_product) ?>
<?php $stockLevel = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); ?>
<?php if($_product->isSaleable()<strong> && $stockLevel > 0</strong>): ?>
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php elseif($_product->isSaleable() && $stockLevel <= 0): ?>
<p class="availability in-stock">
<?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Available for Backorder') ?></span><br />
<?php echo $this->__('Please allow up to two weeks for delivery') ?>
</p>
<?php else: ?>
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
https://edmondscommerce.github.io/magento/ssssssssssssss.html
I am designing a magento website and I am new to it. I am unable to find where to change the URL of Add to Wishlist button.
I have attached the screenshot to check if someone needs.
I will be obliged if someone provides a solution.
addtowishlist
You can change the URL from the following template file:
template/catalog/product/view/addto.phtml
Go to
your_theme > default > template > catalog > product > view > addto.phtml
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist">
<?php echo $this->__('Add to Wishlist') ?>
</a>
<?php endif; ?>
Here you can change href.
I would like to turn all intro images on the blog layout to links to the articles just as read more does.
Found this post here:
Joomla 3.1 intro image as read more link
The solution here is to replace the code in default_item.php from this:
<img
<?php if ($images->image_intro_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
endif; ?>
src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
To this:
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"><img
<?php if ($images->image_intro_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
endif; ?>
src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/> </a>
Followed the instructions, added an override folder in my template, copied default_item.php to it and made the change to the code. Nothing happened. I then tried to change the same lines in the component folder just to see if the problem was with the template override, nothing.
Is there another way of doing this?
Thanks in advance,
Guy.
default_item.php is only used as part of the featured articles view. If you are using the blog view, then the files appear under com_content/views/category/
The image itself is generated under com_content/views/category/blog_item.php on line 35
<?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?>
Change this to (via your template override)
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>">
<?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?>
</a>
I have a magento 1.7.0.2 install. I created a shopping price cart rule with coupon. Everything is fine except that the discount amount displayed in magento (cart, checkout,...) is an extremal value. I found out that extremal value is 2^64 (18 446 744 073 709 550 520). The configuration of the rule does not matter, the displayed discount is 2^64 always.
The subtotal is fine, the shipping is fine the sum of these is 11669. after applying the discount(10%) on the subtotal(10961) the result is 9864. 9864+708=10573 is an acceptable result. So Everything is perfect except the displayed discount.
I don't know where does it go wrong. I can't find the related file. Please help.
Thanks a lot,
István
After all I found the solution. The cause of this error is simple. The discount amount stored by magento is signed, that means it has a negative sign. The file app/design/frontend/[yourfrontend]/[yourtheme]/template/checkout/total/default.phtml ( this is where the amount is written on screen) contains the following code:
<tr>
<th colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
<?php echo $this->escapeHtml($this->getTotal()->getTitle()); ?>
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
</th>
<td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
<?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
</td>
The problem is the formatPrice() function, and the negative parameter. A simple solution is the abs() php function. Change the line
<?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
to
<?php echo $this->helper('checkout')->formatPrice(abs($this->getTotal()->getValue())) ?>
And here we go, the problem solved.
I hope that helps.
I would like to display the related product pricing and have add to cart button along with each of the related products.
Below is the code snippet from the related products page. The $field does not have any pricing available. How can I show the pricing and "add to cart" button? Thanks in advance
<?php
foreach ($this->product->customfieldsRelatedProducts as $field) {
?><div class="product-field product-field-type-<?php echo $field->field_type ?>">
<span class="product-field-display"><?php echo $field->display ?></span>
<span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>
</div>
<?php } ?>
I have found solution here and it works for me:
no need to edit core files
It requires copying the "default_relatedproducts.php", "default_showprices.php" and "default_addtocart.php" to your "template/html/com_virtuemart/productdetails" folder. Then replace all of the code in the "default_relatedproducts.php" with the following code:
<?php
// Check to ensure this file is included in Joomla!
defined ( '_JEXEC' ) or die ( 'Restricted access' );
$model = new VirtueMartModelProduct();
$calculator = calculationHelper::getInstance();
$currency = CurrencyDisplay::getInstance();
?>
<div class="product-related-products">
<h4><?php echo JText::_('COM_VIRTUEMART_RELATED_PRODUCTS'); ?></h4>
<div>
<?php
foreach ($this->product->customfieldsRelatedProducts as $field) {
?>
<div class="product-field">
<?php
$product = $model->getProductSingle($field->custom_value,true);
?>
<h2><?php echo JHTML::link ($product->link, $product->product_name); ?></h2>
<a title="<?php echo $product->product_name ?>" rel="vm-additional-images" href="<?php echo $product->link; ?>">
<?php
echo $this->product->images[0]->displayMediaThumb('class="browseProductImage"', false);
?>
</a>
<div class="short_desc"><?php echo $product->product_s_desc; ?></div>
<?php include 'default_showprices.php'; ?>
<?php include 'default_addtocart.php'; ?>
</div>
<?php } ?>
</div>
</div>
Had a same problem. But I had to show only the price.
So the fastest way is to change sql select statement in customfields.php
Path in Joomla 2.5 for Virtuemart 2.0 administrator/components/com_virtuemart/models/customfields.php
line 548 of
public function getProductCustomsFieldRelatedProducts($product)
change only
$query=
with
'SELECT C.`virtuemart_custom_id` , `custom_parent_id` , `admin_only` , `custom_title` , `custom_tip` , C.`custom_value`
AS value, `custom_field_desc` , `field_type` , `is_list` , `is_hidden` , C.`published` , field.`virtuemart_customfield_id` ,
field.`custom_value`, field.`custom_param`, price.`product_price`, field.`ordering`
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
LEFT JOIN `#__virtuemart_product_prices` AS price ON
field.`custom_value` = price.`virtuemart_product_id`
Where field.`virtuemart_product_id` ='.(int)$product->virtuemart_product_id.' and `field_type` = "R"';
After all on line 559 change
$field->custom_price
to
$field->product_price
And finally...
In template view of product description insert the code below to show the prices of related products
<?php echo $field->product_price ?>
The only problem with the below solution is that it doesn't display the correct images for the related products. It's using the main products image and just repeating it.