Magento put single product in catalog mode - magento

i have a Magento shop and want to do the following:
Some of the products should not be available for buying (they should be put in some kind of catalog mode).
How could this be achieved in Magento?

Make some custom attribute for those products. For example:
can_sale
And on frontend display add to card button depending on this attribute. Like this:
if($product->getCanSale() == 1){
/*Display add to cart button*/
}else{
/*Dont' display add to cart button*/
}

The above answer works, but is a template solution for something that (in principle) should be solved server-side.
If any of your visitors is savvy enough to construct an add-to-cart URL, they can still add products you hid the cart button for, to their carts. Probably a very minor problem of course, in this case.
There's an extension called Not2Order, don't know if I'm allowed to link it here. That extension takes care of enabling / disabling the ordering of products from the server side, which is a little more robust.

Related

Magento trigger shipping by custom option

I have a downloadable product in the Magento catalog. This have a custom option attached to let the user decide if he want to receive the physical copy of the product.
The problem is that magento disable shipping address for every downloadable product. I searched a lot for a solution to this and the general suggestion is to create one downloadable product and one normal product but I really don't want to do that as I have tons of products and it would be hell to manage the catalog.
Can anyone tell me if this is in fact possible to do in magento and if it is possible, point me in the right direction on how to apply the modification to the shipping handling classes?
One way to do this is to overwrite the isVirtual() function within:
app/code/core/Mage/Downloadable/Model/Product/Type.php
When the custom option is selected (and only then), it should behave like:
public function isVirtual($product = null)
{
return false;
}
Checkout will then act like with normal products and request for shipping options.

Hide buy button in product page in same products

I have one issue. It's able to make in magento that in some products don't show add to cart button. Because I want make these products just informational and not buyable.
Is any hack in magento like this?
You could add a custom attribute to your products that would mark them as not available for sale. After doing this, you can just modify your templates to not show the buy/add to cart buttons if the attribute is set to true.
Of course, good practice would suggest that you also prevent these products from actually being added to the cart manually, just hook an observer to the card add event and check for the attribute and skip if it's set to true.
It's not necessary to customize code
just set product stock 0 then enable Display Out of Stock Products
set product stock 0
Enable Display Out of Stock Products
Set Minimum Qty Allowed in Shopping Cart to 1
that's it.
When customer want to add product to cart, the system will not accept is because of the stock level.
PS : I suggest this technique is because of your request which you specified "but buyable" in your question.
Here is the extension Click here for extension which I guess is suitable for your question:
Call For Price

Add two products to magento Shopping Cart simultaneously on click of add to cart button

I have been working on a LiftSuggest - an automatic Product Recommendations generator.
Now,I have introduced a bundling functionality which will bundle two products and assign discount.
For example,
On product page of A of the client's site,I(LiftSuggest) displays a bundle Saying "Buy A and B together and avail 10% off on net value". Now, when the user clicks on the add to cart button , I want both the products to be added simultaneously to cart. I had implemented the solution proposed on this link, but I need the products to be added on click of add to cart button,without entering the quantity or providing the check box.Just imagine that you can see a box( container) containing two products and on click of add to cart button-in that div container itself, both of them should be added to cart.I can make out that I need to store both the products in session, but I don't know exactly how to proceed.
Scripting language used:PHP
Please Help!
There are cart rules for various shopping carts. You can manipulate those rules through coding and achieve the desired output.

Magento: Shopping cart price rule gets applied, but discount not subtracted from subtotal

I have created a shopping cart price rule in my Magento store (version 1.4.1.1), and it seems to get applied without issue on the frontend, but the discount isn't actually reflected in the subtotal or final total. The original item price is $45.00, and the discount should be $35.00, making the final price $10.00. Here are some screenshots of the setup. (Sorry, because I'm a new user it won't let me post images directly in this posting.)
http://imgur.com/a/hdYDb
Main rule page
Actions page
Cart showing that promotional code was applied
Reviewing order (last step before submitting order)
This particular item has some custom options set, which set the pricing for four individual options. The price for the product is $0.00, and then each option has it's own price (I didn't set this part up, so I'm not sure if I'm missing something from here too). Here's a screenshot of the product custom options page: http://imgur.com/uO9HG
Any thoughts? I'm fairly new to Magento, so it's possible I'm just missing something obvious. Thanks in advance for any help or guidance!
I actually JUST figured out what was going wrong, or at least, I figured out a solution, though not sure exactly why this was affecting the shopping cart price rules. You're right that I wasn't even able to get a simple price rule to work - it simply wasn't working no matter how I changed the rule. Anyway, while working on another issue, I realized that I was missing the Subtotal/Grand Total box on the front-end of the shopping cart (I installed a clean copy of version 1.4.1.1 on my localhost, which is when I noticed it was missing from my live site). When I re-enabled the Subtotal/Grand Total box, the rules started working again. (I suppose now that Magento has a place on the front-end to show the discount, it actually applies it, whereas before it would just do nothing.)
So, to re-enable the subtotal/grand total box, in the back end, I went to System > Configuration > Advanced > Enable the Mage_Tax module. Again, not sure why it was disabled in the first place, and I'm not sure if this affects anything else on the site, but it's been up for awhile now and I haven't noticed anything awry. Here's a screen capture of it working: http://i.stack.imgur.com/kjl6S.png
I think the problem comes from using SKUs with your custom options combined with restricting your price rule to the product SKU. Magento combines them using a hyphen - place a test order to see if this is the problem.
The SKU in a test order I made comes out something like this;
[ORIGINAL_PRODUCT_SKU]-[CUSTOM_OPTION_SKU]
At least, that's the result I'm getting from version 1.5.0.1
The quickest solution I could find was to match the rule on the product url key rather than SKU. It isn't the most intuitive solution, but since you wouldn't change the URL on the product (I hope), it will work where SKU's with custom options fail.
In version 1.4, the URL key should be available to choose instead of SKU already. So you can just select url key instead of sku and insert your product's correct url key in your shopping cart price rule. Just replace "SKU is ..." with "URL key is ..." inserting the correct url key for your product.
In version 1.5 I had to enable "Use for Promo Rule Conditions" on the url_key attribute like this;
Log in to Magento admin area
Navigate to Catalog > Attributes > Manage Attributes
Locate the Atrtibute Code "url_key" and click to edit it
Change "Use for Promo Rule Conditions" to Yes
Save the changes
you may need to reindex the Product Flat Data index at this point
Then I could use it in my price rule.
Had this same exact problem on CE 1.9 running PHP7, applying the Inchoo "PHP 7 compatibility extension for Magento 1" solved the issue!
https://github.com/Inchoo/Inchoo_PHP7

Please specify the product's option(s) in Magento

Actually i am using Elias_configurablebundle plugin for the configurable product as associated of the Bundle Product and to display GRID* for the configurable associated products i am using magento mechanics grid. here i have merged both of the extensions it showing GRID on bundle view page but showing Please specify the product's option(s)* on click of the **Add To Cart.
Although everything is fine, no required field left to fill out, i have applied any single custom options for any of the product.
so here i want to remove this validation so then it will directly redirect to shopping cart page.
Thanks
Configurable products need to have their options chosen (say, color or size) in order to be added to the cart. Otherwise, there is no way to decide which simple product should be decremented from the inventory. So there is no way for you to "skip" selecting this information, other than hardcoding the selections for the configurable product.
If you do that, just use the simple products instead, and skip all the headache.
Thanks,
Joe
Another thing to check is that the options fields are actually inside the tags. Its fairly easy in Magento to move the option selects to a different column and not realize that you are moving them outside the add to cart form tags.
if the options are selected outside the form tags, then as far as the form is concerned no options have been selected.
Hope this helps someone down the road.

Resources