Magento Admin - Please Select Products to Add - php

When creating an order within the admin section, you get the 'Please Select Products to Add' how can I change the code to only show Configurable products within the grid instead of all the products?

To limit the admin order creation process to configurables only, you need to add a product type filter to the collection which the Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid class is using.
$collection->addFieldToFilter('type_id','configurable');
This can be accomplished in different ways, whether via a block rewrite using Magento's nifty configuration-based classname rewriting or by using an observer (the latter being the preferred way).
Post a comment if you need help with the observer or rewrite config.

Related

Price range filter in opencart

I have the filter module installed in Opencart V2 that filters products on a variety of attributes. They are all check boxes.
I want customers to be able to filter products using a price range slider. There are a lot of modules available online, however most are for V1.5.
How would I go about incorporating a range <input> to filter my prices?
I could add a price attribute in filters, however this limits the customer to a variety of check boxes - and I need my pricing to be extremely accurate (it will be displaying over 50,000 products).
Is there a way I can edit the current filter module, and not create a new one?
I have implemented several pricing filters in opencart. The available filters are not free so I decided to make my own. Here is what I did.
I made a custom module (price_filter) and made 3 fields in it. Min price, max price (both dynamic) and status and I downloaded price range html and put it in the tpl.
I enabled it and then on search, i grabbed the url through jquery and integrated my two own parameters (min price and max price) through jquery and reloaded the page.
In the controller, i retrieved those variables, passed to filter_data array and changed the model a little bit too. I added the min_price and max_price conditions in my model.
It was simple if you know how to play with controller and model.
Solved my problem using this extension here:
http://www.opencart.com/index.php?route=extension/extension/info&extension_id=23022&filter_search=jquery%20price%20slider&filter_download_id=42&sort=e.price&order=ASC
I am using the default theme, with stylesheet modifications. It wasn't working at first as I had modified the category.tpl file to such an extent that the plugin wasn't working correctly.
Resetting the .tpl file to it's defaults and making new changes, it now works.
You can use opencart flexi product filter extension to solve this problem
https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=35570&filter_member=TemplateMaza

How to assign extra fee to products for specific category in Magento?

I want for products of a specific category to add an additional field with extra cost for packages, as shown here: http://i.imgur.com/bm9ccBC.jpg
Is there any mechanism in Magento by which to do this or require additional module?
You can use
Custom Options
in order to fulfill your requirement.
You can add this option from the Magento admin for a particular product. Please refer screen-shot.
Click to view image
The answer that Anx submitted is absolutely right. But you'll have to assign custom option to each product of that category. If you want to repeat the same custom option in multiple products, it will be a lot of manual work.
The simplest solution to apply the same custom option to multiple products is through this free extension.
http://www.magentocommerce.com/magento-connect/custom-option-manger.html
first, apply the custom option as mentioned by Anx, and then use this extension to copy paste it to multiple products. I used it on my site and it worked fine.

Creating a new product while creating a new order and also add that product in order

Is it possible, in Magento, to build a button to add a new simple product while creating an order in the backend?
It is not important that the product would be saved in the catalog: it should to be saved into the order. Only two of the product's attributes would be needed: name and tax rate (optionally others). Qty e price could be edited from the order cart.
Yes, it's posible, you need a controller in order to do that.
Remember that you need to provide us the code that you're working on, and don't expect that we program all for you.
Thanks
Thanks to Beto Castillo I went into the spirit to think more clearly about this. The project is yet under construction. Anyway starting steps could be:
Create the right inputs to add a new product in a ChildHtml of sales/order/create/data.phtml, and adjust the layout files. Along with the inputs there will be a button to trigger the creation of the product. In one of this inputs I have to load options for tax rates.
There is plenty of ways to create a new product, i.e. Magento: Adding new products programmatically. I just need to get the above inputs.
The product should be added to order quotes in the database (I could start with this: Create order programmatically in Magento)
Update the create order view, calling an ajax function to reload the item grid. Part of the code already exists in Magento. All this steps should be packed into the same ajax call: here comes the controller action named by Beto Castillo.
So the answer is yes, it is possible.

Add custom attributes like serial number to order_item and quote_item

I want to add a custom attribute to magento order_item and quote_item and a field in the order form for my serial number attribute and other custom attributes.
I'm selling Tablets offline but I am using Magento backend for managing all inventory and customer information along with orders, the tablets are given on subscription bases so there is no shipping as the customer would be at store during purchase.
I want to add custom attribute which are unique to the customer and tablet.
I could create an attribute for the customer but what if they order more than one tablets which means logically the only way is to place those attributes in the order item.
I seriously don't know how to go about.
I hope someone can point me to extended magento sales module and add my custom attribute to order_item and also show in magento order form.
First you need to add/change this two tables:
- sales_flat_order_item
- sales_flat_quote_item
just add fields and name it as you wish (that will be your new attributes)
file you need to edit for your new attribute to be visible on order page should be this one:
app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml
and your new attribute:
<?php echo $_item->getMyCustomAttribute() ?>
If you would like to make that attribute "the proper way" it requires a bit more skill..
Here is an example how you can add custom category attribute, same would be for your problem:
http://inchoo.net/ecommerce/magento/how-to-add-new-custom-category-attribute-in-magento/
Thanks
I would ask some of the more popular extension providers for a custom quote. AheadWorks comes to my mind quickly... I say visit the Magento Connect store and browse through highly rated extensions and you'll see there are a small number of companies doing lots of successful work.
They will be able to "more properly" handle, store, track, and communicate your desired data through the entire system.
Once I better quantify a similar situation I would like to program, I will seek the help of experienced module builders. The Zend MVC is a miserable bowl of spaghetti once you start trying to code in it! :D

Magento: Sort by discount percentage with dropdown menu

I am new to Magento and am facing a problem. In my categories, I need to add a sort by option in the dropdown menu. So far it is easy, except that it is a discount percentage which is not stored in the DB but the calculation of price and discount_price.
I found how to query with the calculation, I just don't know how to set the things together.
How to add a entry in the Dropdown menu?
How to link that entry with a specific module (if needed)?
What to override?
I am a bit confused and would really appreciate your inputs.
Edit
I have found a solution.
Created a module that overrides Mage_Catalog_Block_Product_List_Toolbar
Overrided setCollection method
Added fields to select via Zend ($collection->getSelect()->columns())
Created a new attribute in the backend whose keyword is the alias of our created field
That's pretty much it.
I have found a solution.
Created a module that overrides Mage_Catalog_Block_Product_List_Toolbar
Overrided setCollection method
Added fields to select via Zend ($collection->getSelect()->columns())
Created a new attribute in the backend which keyword is the alias of our created field
That's pretty much it.

Categories