Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

mail_open
Adding this code to get buttons......
Dom Rand
Member
May 6, 2014 - 11:13 am
Member Since: April 2, 2014
Forum Posts: 219
sp_UserOfflineSmall Offline

I need to add this code to

<div class="share-buttons share-buttons-og" data-action="want" data-counter="false"></div>

to view.phtml in app/design/frontend/base/default/template/catalog/product.

my view.phtl is this

<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses…..fl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses…..fl-3.0.php Academic Free License (AFL 3.0)
*/

/**
* Product view template
*
* @see Mage_Catalog_Block_Product_View
* @see Mage_Review_Block_Product_View
*/
?>
<?php $_helper = $this->helper(‘catalog/output’); ?>
<?php $_product = $this->getProduct(); ?>%MINIFYHTML522be0f9e1e43c53ce5637d05db4a39921%<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
<div class="product-view">
<div class="product-essential">
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
<?php echo $this->getBlockHtml(‘formkey’) ?>
<div class="no-display">
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
<input type="hidden" name="related_product" id="related-products-field" value="" />
</div>

<div class="product-shop">
<div class="product-name">
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), ‘name’) ?></h1>
</div>

<?php if ($this->canEmailToFriend()): ?>
<p class="email-friend"><a href="<?php echo $this->helper(‘catalog/product’)->getEmailToFriendUrl($_product) ?>"><?php echo $this->__(‘Email to a Friend’) ?></a></p>
<?php endif; ?>

<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php echo $this->getChildHtml(‘alert_urls’) ?>
<?php echo $this->getChildHtml(‘product_type_data’) ?>
<?php echo $this->getTierPriceHtml() ?>
<?php echo $this->getChildHtml(‘extrahint’) ?>

<?php if (!$this->hasOptions()):?>
<div class="add-to-box">
<?php if($_product->isSaleable()): ?>
<?php echo $this->getChildHtml(‘addtocart’) ?>
<?php if( $this->helper(‘wishlist’)->isAllow() || $_compareUrl=$this->helper(‘catalog/product_compare’)->getAddUrl($_product)): ?>
<span class="or"><?php echo $this->__(‘OR’) ?></span>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml(‘addto’) ?>
</div>
<?php echo $this->getChildHtml(‘extra_buttons’) ?>
<?php elseif (!$_product->isSaleable()): ?>
<div class="add-to-box">
<?php echo $this->getChildHtml(‘addto’) ?>
</div>
<?php endif; ?>

<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<h2><?php echo $this->__(‘Quick Overview’) ?></h2>
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), ‘short_description’) ?></div>

</div>
<?php endif;?>

<?php echo $this->getChildHtml(‘other’);?>

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml(‘container1’, ”, true, true) ?>
<?php endif;?>

</div>

<div class="product-img-box">
<?php echo $this->getChildHtml(‘media’) ?>
</div>

<div class="clearer"></div>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml(‘container2’, ”, true, true) ?>
<?php endif;?>
<div class="share-buttons share-buttons-og" data-action="want" data-counter="false"></div>
</form>%MINIFYHTML522be0f9e1e43c53ce5637d05db4a39922%</div>

<div class="product-collateral">
<?php foreach ($this->getChildGroup(‘detailed_info’, ‘getChildHtml’) as $alias => $html):?>
<div class="box-collateral <?php echo "box-{$alias}"?>">
<?php if ($title = $this->getChildData($alias, ‘title’)):?>
<h2><?php echo $this->escapeHtml($title); ?></h2>
<?php endif;?>
<?php echo $html; ?>
</div>
<?php endforeach;?>
<?php echo $this->getChildHtml(‘upsell_products’) ?>
<?php echo $this->getChildHtml(‘product_additional_data’) ?>
</div>
</div>

I would like the buttons to appear where the red box is?
Image Enlarger

"Dont believe everything you read on the internet just because there is a picture with a quote next to it" Abraham Lincoln

Avatar
Matthew Ogborne

Founder
May 6, 2014 - 11:52 am
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

Howdy Dom,

Thanks for posting here, my email is unreal at the moment.

First point to note is do not edit ANY files in the “app/design/frontend/base/” folder, doing so will bite you in the butt later on, say during an upgrade or update to Magento, instead add these amendments to a child theme in Magento.

The above file looks like it’s the container for the page, but not actually the section you really need. Can you follow the steps in the viode below which is for a different block and I suspect you’ll want to amend a smaller template file instead.

But you won’t be able to see which one until you turn the blocks & phtml paths on.

Matt

"Selling an item online is easy, but making living from a business that sells online, well that’s something different entirely!"

Ultimo Magento Theme

 

Why Should You Join UnderstandingE?

 
  • Access to over 500 step-by-step video tutorials
  • +20 video courses available
  • Magento, M2E Pro, Magmi, eBay, Amazon & Design all covered
  • Everything is in 100% Plain English
  • Learn how to build your own multi-channel software for eBay & Amazon
  • Access to the community forums, meet fellow business owners like yourself

Join Now with 2 Clicks

 

Join now for less that £1 per day you can gain access to over 400 step-by-step video tutorials & learn how to build your very own multi-channel software.

 

Forum Timezone: Europe/London

Most Users Ever Online: 1012

Currently Online:
42 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Jim @ Moogento: 688

Steve Froggatt: 514

Badeth - UE: 513

Jimbob: 453

Paul Cartwright: 414

Forum Stats:

Groups: 6

Forums: 37

Topics: 5221

Posts: 27485

Administrators: Matthew Ogborne: 4565, Dave Furness: 4606