I'm trying to work out how to show MSRP on the Product page on Magento 2.
I want to only display the "MSRP" if the value is great than the "Price".
On our current site which is 1.9.2 I have it showing as "RRP: $100.00"
In 1.9 I edited app/design/frontend/theme/default/template/catalog/product/view.phtml
and added
<?php if ($_product->getMsrp() > $_product->getPrice()) :?>
<?php echo $this->__('RRP: ') ?> <?php echo Mage::helper('core')->currency($_product->getMsrp(),true,false);?>
<?php endif;
As Magento 2 is completely different I'm having trouble trying to work it out.
Any help would be appreciated
Thank you in advance.
I implemented a simple Magento 2 extension to show the MSRP price on the product listing and product detail pages, without requiring a user to click a link.
See more details here: https://github.com/krakencommerce/magento2-module-display-msrp-inline
Screenshot showing what the extension does:
Related
I need to move the Newsletter Signup from the footer into a Content Block I've created in the backend of my Magento 2.1.3 installation.
In Magento 1 you could use the code below but this appears to be no longer the case using Magento 2
{{block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"}}
Was wondering if anyone had a solution that could help. The site I'm developing is china.testdev.tech and the newsletter signup needs to go into the blue box in the middle of the homepage content.
Thanks in advance.
Kev
In magento-2 To call the particular phtml file, You need to used this code.
{{block class="Magento\Newsletter\Block\Subscribe" name="home.form.subscribe" template="Magento_Newsletter::subscribe.phtml"}}
I had links in my website which were working fine but I noticed that these are not working now.
eg : http://www.facebook.com/sharer/sharer.php?s=100&p[url]=http://www.otlcampaign.org/blog/2013/02/04/inconvenient-truth-education-reform&p[images][0]=http://www.otlcampaign.org/sites/default/files/journey-for-justice-mlk-memorial.jpg&p[title]=The+Inconvenient+Truth+of+Education+'Reform'!&p[summary]=Recent+events+have+revealed+how+market-driven+education+policies,+deceivingly+labeled+as+%22reform,%22+are+revealing+their+truly+destructive+effects+on+the+streets+and+in+the+corridors+of+government:
this link was working fine before but its not taking custom title , summary etc. Please help me to resolve this problem.
I'm not using meta tags because there are lot of share buttons which have different title, description, image urls.
I have already gone through existing question on this site but those solutions are obselete. eg Facebook Share doesn't show my description or my thumbnail
Any suggestions please.
I'm not sure if you're comfortable with using PHP, but have you tried the following?
<?php
$title=urlencode('Title');
$url=urlencode('http://www.facebook.com/yourfanpage'); /* Note Personal FB Pages will not work */
$summary=urlencode('Custom message');
$image=urlencode('http://www.yourdomain.com/facebookshare/images/customthumbnail.jpg');
?>
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $title;?>&p[summary]=<?php echo $summary;?>&p[url]=<?php echo $url; ?>&&p[images][0]=<?php echo $image;?>', 'sharer', 'toolbar=0,status=0,width=548,height=325');" target="_parent" href="javascript: void(0)">
Share our Facebook page!
</a>
From your example, also, I noticed that one of the issues might be the ampersands. You have 100& instead of 100& You will need to double check all of the links for these and the spaces, etc.
Hello all i need to display product name on my contact from which is displayed on product page. So basically i want that my contact form will display currently viewing products name if anyone could help me doing so thanks in advance.
As you are on the product view page you should be able to access the current product from the registry:
<?php $product = Mage::registry('product') ?>
my issue might look a strange a little bit.
i'm working on a cakephp website in which i want to integrate facebook comments, like, and share functions. i'm using for that Webtechnick's Facebook plug-in, and i think this far everything is doing great. except one thing.
whene i call comments and like:
<?php $facebook->comments(); ?>
<?php $facebook->like(); ?>
it works and i have my share and like buttons, but when i call
<?php $facebook->share(); ?>
<?php $facebook->comments(); ?>
<?php $facebook->like(); ?>
only the share button is displayed. It's like if the share button hides likes and comments
not sure if this is clear enough, I know it's a strange problem.
If anybody has experienced something similar to this please help, thank you.
You may be better off using the social plugin versions of these three. I'd recomment you start with the HTML5 versions and go from there.
See:
https://developers.facebook.com/docs/reference/plugins/like/ (does both like and send)
https://developers.facebook.com/docs/reference/plugins/comments/
So I am working on Joomla 1.5 and retro fitting an existing website to work with this CMS. I've got most of the templates down and I have created Modules for Side navigation on the internal pages. However, on the original website, php in clauses are used to change the class of the link to show the current page the visitor was on (e.g
<a <?php if ($page=="career_opportunities") echo "class=\"currentpage\""; ?> href="?page=career_opportunities">Career Opportunities</a><br/>
<a <?php if ($page=="locations") echo "class=\"currentpage\""; ?> href="?page=locations">Practice Locations</a>
</div>
is it possible for me to maintain this structure in the new side navigation menu I created in joomla? Do I have to make it HTML customized type Module? Do I need to find a way to capture the current page's ID? Where should I begin?
Thank you in advance
You can do it by using css also which will be much easy for you to handle this using css.