Unable to Remove products from wishlist - magento

I want to remove product from wishlist in product listing page(default/template/wishlist/item/column/image.php).
I have seen the remove url function in wishlist page $this->getItemRemoveUrl($item) . but it doesn’t work in image.php.
Even i tried,
echo Mage::helper(‘wishlist’)->getRemoveUrl($_product)
it gives URL but not showing parameters.
eg:-
domain.com/wishlist/index/remove (not working)
domain.com/wishlist/index/remove/item/3 (actual)
So how can i solve this

this function should work for you
Mage::helper('wishlist')->getRemoveUrl($_product)

Please compare your xml file with the magento default xml file
May be there is any function missing or commented
Also there is another possibility or error
in
helper('wishlist')->getRemoveUrl($_product)
may be $_product contains additional white spaces or symbols
please check it

Using the getModel you can delete the wishlist product
as below
Mage::getModel('wishlist/item')->load($id)->delete();

Related

Magento price showing twice

I installed a new template on my Magento store and when I got to a product page it shows the price twice? Most of my products are a "simple" Product and I have one "Configuarable" product
Any ideas how I can get rid of one of the prices?
Here is Simple product:
Here is configurable product: (with an option selected)
Any ideas?
I'm running latest 1.9.3.7 and can't find a fix anywhere
You need to check your
app/design/frontend/default/your _theme/temlate/product/view.phtml
1st: inspect find the class or id
2nd: then remove wrong price code
before doing this take a backup of your file
I don't think anyone can help you here unless it's a popular theme people would know. The problem is not in Magento, it's in the theme files. You will need to find the theme file and check the php logic to truly know what is happening there. Best case, contact the theme developer if you purchased it or switch to a new theme.
To find the theme file responsible for printing the price, you can enable template hints. This will show the hints to you and all the customers, so be diligent about doing this live. Secondly, you will need to take a look at the block which encompasses the pricing. When you find the template name, just go to the .phtml file and see what's going on there with the price output.
Edit app/design/frontend/default/your_theme/template/catalog/product/view.phtml
Look for price divs and comment one.

Why is my wish list limited to one item?

Im using magento 1.9 and im having an issue with the wishlist, for some reason it will only let me have one item in my wishlist and when I goto add another item to the wishlist it replaces the item that was already in my wishlist, there is nothing in the configuration to limit the wishlist item im just a bit confused at why it would be doing this, any ideas ?
Right!!, after hunting the web to try and find a solution I have found a solution, you have to edit the file app/code/core/Mage/Wishlist/Model/Wishlist.php
find:
public function getItemCollection()
and change
$this->_itemCollection = Mage::getResourceModel('wishlist/item_collection')
->addWishlistFilter($this)
->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly))
->setVisibilityFilter();
to
$this->_itemCollection = Mage::getResourceModel('wishlist/item_collection')
->addWishlistFilter($this)
->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly));
this worked for me and im using magento 1.9.0.1
the source for this fix is here: http://www.magentocommerce.com/boards/viewthread/291225/
This is an out of the box feature, you do not need to edit any core code to fix this. Correction: You don’t have to edit any code
I had the same issue and found it was from an improper import of products and that website availability was incorrectly set.
It seems that Magento added a website filter on the wishlist collection to prevent items not available in a website from appearing in a customer's wishlist.
It also seems that items may not have a website value => which prevents wish list items from appearing (or just 1 item, the last one added).
How to fix it : Simply select your store products on catalog page, select ‘Update Attributes’ action and click on submit.
Select Websites panel and check your website in ‘Add Product To Websites’ block.
Reindex your data if necessary.
You can now add your products to your wishlist and see all of them in your wishlist. This is the proper solution and does not remove functionality from your Magento webstore.
Simply reindex everything in: System > Index management

Product image is not showing up in poduct page where as showing list

Magento product images are showing in list or grid. when i click on the product, the product image is not displaying in the product page. Remaining things Add to cart, Add to compare, wishlist everything is working fine. I think the media.phtml is not loading, Please suggest me in right way.
Thanks in advance.
Firstly, you must confirm whether the media.phtml is loaded. You may insert some dummy characters in the media.phtml to see whether it will show in the frontend.
Thus, if the characters show, congratulations, you are just close to find the problem. In this situation, most problems are caused by image attributes not loading to the model object. Simply just reload the object with the following snippets:
$_product = Mage::getModel('catalog/product')->load($_product->getId());
Otherwise, you may confirm the following things:
Is the media.phtml is overload by the other theme?
Compare with the default catalog.xml with your current one, to find out the media.phtml is correctly loaded, including path, block type, name, as, etc.
Check the permission settings for the xml and template files
These are stuffs coming to my mind when reading your problems. Hope it helps.

Redirect a product to other website

I am looking for a way to have a product on my magento store, make it visible but not purchaseable and redirect users accessing it to another page/external url.
Basically i have 6 products and would like to redirect all users who go to one of those products to another domain / external url. The product should be displayed but not be purchaseable - rather instead of add to cart link to an external url - or if possible even redirect the whole product detail page to another url...
What’d be the best way to do that?
i am trying for two days already but haven’t found the best solution yet… my programming skills aren't the best yet...
thanks!
i think what you should do is to add one new attribute for redirect url , for your six products you can specify the redirect url in that attribute , and in the list.phtml you can place a condition that if a product has value in that attribute , you can use that value in anchor tag and in else case you cam use the regular product links for other products .
i mean you can add a new attribute for a products in admin like there is other attributes eg. name, description , and in file you can fetch your new attribute like other attributes , just replace the attribute code with your and take that in condition that it will work work only if the product has the value for your new attribute
for fetching attribute in your file you can use <?php echo $_product->getAttributeName() ?>

is it possible to show custom attributes of associated products under a grouped product in front end? (Magento)

I have a typical condition in my magento Grouped product.
Is it possible to show Custom attribute (color dropdown) of associated product under Grouped products in the fronted.. as shown below
Consider the sample blanket product
Let me know if i am not clear.
Thanks
It's not clear your question but I would give you a small example to get text field, multiple select or drop-down listbox value.
First, we should load the product collection :
<?php
// load the product that id 125, then show attributes of the product
$product = Mage::getModel('catalog/product')->load($this->getProduct()->getId(125));
echo $product->getCustomAttribute();
// lets say your custom attributes name is "size" and type is text field
echo $product->getSize();
// lets assume your custom attributes name is "product_size then
echo $product->getProductSize();
// lets assume your attribute type is drop-down, this will get array of attribute options instead of value that you selected
echo $product->getAttributeText(product_size);
// to get drop-down value that you selected
$attribute = $product->getAttributes();
$productSize = $attribute['product_size']->getFrontend()->getValue($product);
let me know if it's not meet your request.
I have found a solution for this, 3 edited files.
But these files are edited for a previous version of Magento, I don't know which version.
I have uploaded this 3 files on my Magento 1.7 and it works but when add the product to the cart it give's a error with app/code/core/Mage/Sales/Model/Quote.php
This file: Quote.php is one of the edited files, when i upload the original Quote.php it works.
Look at this pic: http://s8.postimage.org/g8bvbth0z/Naamloos.png
But maybe i get more errors in the future, i don't have any ideas..
I am a noob with this, if someone can look at the edited files and chek how they have do this and compare this with the newest files for Magento 1.7 maybe we can help to many peoples with this problem.

Resources