In my website i have enable one page checkout.Also there are only downloadable products.
I need to remove Item options in Checkout Order Review section (Please refer below image. I need to remove highlighted parts.)
Can anyone let me know how to do this please.
Thank You.
I think you want to remove custom option in checkout.
The custom options are displayed in the default template (in \app\design\frontend\base\default\template\checkout\cart\item\default.phtml) with the following snippet:
<?php if ($_options = $this->getOptionList()):?>
<dl class="item-options">
<?php foreach ($_options as $_option) : ?>
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<div class="truncated_full_value">
<dl class="item-options">
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
</dl>
</div>
<?php endif; ?>
</dd>
<?php endforeach; ?>
</dl>
<?php endif;?>
So, you comment this or remove as per your convenience.
But in your case you are using onepage checkout So, you have to check this code in extensions phtml file.
You need to go in app\design\frontend\rwd\default\template\downloadable\checkout\onepage\review\item.phtml
Open item.phtml file
And in this file here is code what is displaying that
<?php if ($links = $this->getLinks()): ?>
<dl class="item-options">
<dt><?php echo $this->getLinksTitle() ?></dt>
<?php foreach ($links as $link): ?>
<dd><?php echo $this->escapeHtml($link->getTitle()); ?></dd>
<?php endforeach; ?>
</dl>
<?php endif; ?>
So you can remove or just comment this <!--<dl>...</dl>--> and you will get you want.
And yes go to your theme folder if your is not rwd.
Related
I currently have my short description being called in view.phtml
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
</div>
<?php endif;?>
I'd like to add this to my long description (which is currently being called by description.phtml).
I've tried adding this bit of code to the description.phtml
<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
However, when I do that the tabs disappear altogether. Is there a way to possibly merge the short and long description in Magento, or just a way to add the short description into the description tab without it breaking?
You need to add the following code to get short_description value in description.phtml
<?php $_short_description = $this->getProduct()->getShortDescription();?>
Then add this
<?php if ($_short_description): ?>
<div class="std">
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_short_description, 'short_description') ?>
</div>
<?php endif; ?>
copy core file form this url app/design/frontend/base/default/template/catalog/product/view/description.phtml to app/design/frontend/yourtheme/default/template/catalog/product/view/description.phtml
if you want to combine short and log description togather then try below code
<?php $_description = $this->getProduct()->getDescription(); ?>
<?php $_short_description = $this->getProduct()->getShortDescription(); ?>
<?php if ($_description && $_short_description): ?>
<h2><?php echo $this->__('Details') ?></h2>
<div class="std">
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description')." ".$this->helper('catalog/output')->productAttribute($this->getProduct(), $_short_description, 'shortDescription') ?>
</div>
<?php elseif($_description) : ?>
<h2><?php echo $this->__('Details') ?></h2>
<div class="std">
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description');?>
</div>
<?php endif; ?>
if you just want to place short then remove long description code from above
Hope this will help you out
Thanks
I am trying to change Magento toplink wishlist button url.
At the moment it is generated in wishlist.xml with
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link" />
<action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>
This leads me to merry chase in core files with no result.
What I want to do is for the button to direct to /guestwishlist/ instead of /wishlist/ (which in addition atm, for some reason leads to wishlist/index/share).
I've read most of the relevant guides and answers since worked on it for hours.
Just need to change that single button url to go to /guestwishlist/.
EDIT>
This is how my top.links.phtml looks like
<?php if($toplinks && is_array($toplinks)): ?>
<ul class="links">
<?php echo $this->getChildHtml() ?>
<?php foreach($toplinks as $_toplink): ?>
<li<?php if($_toplink['first']||$_toplink['last']): ?> class="<?php if($_toplink['first']): ?>first<?php endif; ?><?php if($_toplink['last']): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_toplink['liParams'] ?>><?php echo $_toplink['beforeText'] ?><a <?php echo $_toplink['aParams'] ?>><?php echo $_toplink['innerText'] ?></a><?php echo $_toplink['afterText'] ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
You can change the wishlist url to custom url by editing template/page/html/top.links.phtml
There is a foreach in which you can check if current looping item is wishlist, change the default url to your custom URL.
This will make sure whatever changes you are making are only limited to frontend rendering of content and also no need to override any core files.
To change wishlist url in proper magento way you need to override:
app/code/core/Mage/Wishlist/Block/Links.php
in local or community codePool.
In this file you will find code like this:
protected function _toHtml()
{
if ($this->helper('wishlist')->isAllow()) {
$text = $this->_createLabel($this->_getItemCount());
$this->_label = $text;
$this->_title = $text;
$this->_url = $this->getUrl('wishlist');
return parent::_toHtml();
}
return '';
}
Change
$this->_url = $this->getUrl('wishlist');
to
$this->_url = $this->getUrl('guestwishlist');
and you are done.. :)
Now you must create or have a module for guestwishlist.
The core solution works yeah but I had to keep in mind that I only want to change the link for guests, for customers the link had to stay the same.
Specifics to my site used the template/page/links.phtml file instead of top.links.phtml mentioned by Blastfreak so I had to two everything twice :P
I used the solution of checking for the current item in loop.
<ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>>
<?php foreach($_links as $_link): ?>
<?php if ($_link instanceof Mage_Core_Block_Abstract):?>
<?php if ($_link->gettype() == 'wishlist/links' && (!$this->helper('customer')->isLoggedIn())): ?>
<?php echo '<li class="first last">My Wishlist</li>' ?>
<?php else: ?>
<?php echo $_link->toHtml() ?>
<?php endif;?>
<?php else: ?>
<li<?php if($_link->getIsFirst()||$_link->getIsLast()): ?> class="<?php if($_link->getIsFirst()): ?>first<?php endif; ?><?php if($_link->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li>
<?php endif;?>
<?php endforeach; ?>
</ul>
Had to echo some extra classes for style.
I did an quick view in product catalog (list.phtml) using Magento 1.7, but I'm unable to get the FULL product options block so that it is identical to the product page (showing select, radio button, select multiple, etc.). Can someone help me?
*Sorry for my bad English.
I tried put the view.phtml' code, but this don't work.
I also tried some tutorials that I found on google, but what worked converted all options in select, but I need to get entire block.
...
<?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 endif; ?>
<?php echo $this->getChildHtml('other');?>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
...
How to get image of custom option from product detail page to Cart page. offcourse i can get image download link, image name and its size..but i am unable to get image path to show image on cart page.
Try this by adding custom option image for any product by admin then browse image for it then press add to cart you can see the dowloadable link but not image..plz help me to solve this issue.
Find this code on default.phtml on /app/design/frontend/base/default/template/checkout/cart/item/default.phtml
and replace with below code
<?php if ($_options = $this->getOptionList()):?>
<dl class="item-options" style="width: 452px;">
<?php foreach ($_options as $_option) : ?>
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
<dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
<?php if($_option['label'] == 'Photo'){
$photo = $_option['value'];
$photo = str_replace("<a", "<img width='100' height='100' style='float: right;'", $photo);
$photo = str_replace("target", "", $photo);
$photo = str_replace("href", "src", $photo);
echo $photo."<br>";
?>
<?php }else{ ?>
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<div class="truncated_full_value">
<dl class="item-options">
<dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
</dl>
</div>
<?php endif; ?>
</dd>
<?php } ?>
<?php endforeach; ?>
</dl>
<?php endif;?>
I would like to hide just a single category from my layered navigation. I have the "Show in Navigation" set to no but it still shows up on search results page. Is there a way to hide this?
To exclude a single category from layered navigation please follow the below steps. Note you could do this for any type of category listing.
Open /app/design/frontend/default/YOURTHEMENAME/template/catalog/navigation/left.phtml. If it does not exist, copy it from the base folder.
Find the code:
<dl id="narrow-by-list2">
<dt><?php echo $this->__('Category') ?></dt>
<dd>
<ol>
<?php foreach ($_categories as $_category): ?>
<?php if($_category->getIsActive()): ?>
<li>
<a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
</li>
<?php endif; ?>
<?php endforeach ?>
</ol>
</dd>
</dl>
Add this if statement just inside the foreach loop (and dont forget to close it): <?php if ($_category->getId() != 22): ?>
The new code will look like this:
<dl id="narrow-by-list2">
<dt><?php echo $this->__('Category') ?></dt>
<dd>
<ol>
<?php foreach ($_categories as $_category): ?>
<?php if ($_category->getId() != 22): ?> <!-- If statement here, replace category ID -->
<?php if($_category->getIsActive()): ?>
<li>
<a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
</li>
<?php endif; ?>
<?php endif; ?> <!-- End new If statement here -->
<?php endforeach ?>
</ol>
</dd>
</dl>
Replace the category ID with the ID of the category you wish to exclude.
To find out the ID of a category go to your Magento Admin panel and Categories, when you click to edit a category at the top left you will see it’s numerical ID.