chain populating select with woocommerce - ajax

My special form has two select boxes. I got the first one populate with options from a product categories
What I'm trying to achieve next is the following:
By selecting one of the category from first pre-populated box - the second box gets populated with sub categories for selected category on what option was selected in the first box.
and By selecting one of the category from second box - the third box gets populated with for The product belongs to that subcategory.

Related

Magento show products in category view as dropdown list

Here is what I want to do with Magento.
In category view, we can display products choosing either "by list" or "by grid". These are built-in options.
For one specific category, I would like the products to be displayed in a dropdown menu such as in the following picture. Plus, the user will not be able to select the grid or list view with the dropdown view as default.
built-in category view
dropdown menu showing products
I think I have to modify codes in list.phtml file. Could someone help me to implement the right code in order to get this result?
Add lens_type as a custom dropdown attribute with all lens types as attribute options/labels. Set 'Use in layered nvigation'to 'Yes'
Add this new attribute to the default attribute group.
Reindex database
Insert the products and select the lens type for each product.
Add the products to the desired category.
Set this category's option 'Is anchor' to 'Yes'
Now you have a layered category with a drop down option where you can choose teh lens type.

Custom product attributes behaviour magento

I will be very direct..
Reference Ecommerce Website
There is a custom stitching options menu on the product description page.
1. Unstitched
2. Standard Measurements
3. Custom measurements
On standard and custom measurements, drop downs and a popup opens respectively, whose details goes on further with the added product.
How can i implement the same product options menu in magento ?
it's easy the reference site is a magento, an that are a bundle product
the only thing you need create a new product with the options.
UPDATE for #Enigmativity
in the official webside of Magento say:
"A bundle is a “build your own,” customizable product. Each item in a bundle can be based on one of the following product types:
Simple Product
Virtual Product
OpenStep 1: Create the Bundle Product
On the Admin menu, select Catalog > Manage Products. Then, click the Add Product button.
In the Create Product Settings section, select the Attribute Set for the product.
In the Create Product Settings section, do the following:
a. Accept the “default” Attribute Set, or select another.
b. Set Product Type to “Bundle Product.” Then, click the Continue button.
Step 2: Complete the Product Information
Complete the product information as you would for a simple product, with the exception of the following:
a. On the General tab, set both the SKU and Weight fields to one of the following:
Dynamic
Fixed
If using a fixed SKU or Weight, enter the actual value in the field to the right.
Dynamic SKU and Weight
b. On the Prices tab, set Price to one of the following:
Dynamic
Fixed
If using a fixed price, enter the actual value in the field to the right.
Minimum Advertised Price (MAP) is not available for Bundle products with dynamic pricing.
Dynamic Price
c. Then, set Price View to one of the following:
As Low as
Price Range
Click the Save and Continue Edit button.
Step 3: Add Bundle Items
In the Product Information panel on the left, select the last option, Bundle Items.
Then in the Shipment section, set Ship Bundle Items to one of the following:
Together
Separately
Shipment
In the Bundle Items section, click the Add New Option button.
In the Default Title box, enter a label for the bundle item, as you want it to appear on the Customize Product page. Then, do the following:
Bundle Items
a. Set Input Type to one of the following:
Drop-down
Radio Buttons
Checkbox
Multiple Select
b. Set Is Required as needed.
c. In the Position field, enter the order that you want this item listed in relation to other items included in the bundle.
Click the Add Selection button. Then, do the following:
Select Products
a. Click the Reset Filter button to display the unfiltered list of products.
b. Select the checkbox of each product that you want to include in this item.
c. In the Qty to Add column, enter the quantity of each item to be included.
Click the Add Selected Product(s) to Option button. When the items appear in the Bundle Items list, do the following:
a. Set User Defined Qty to one of the following:
Yes
Displays an input box so the customer can change the quantity.
No
Prevents the customer from changing the default quantity.
b. Enter a number in the Position column of each item to determine its place in relation to other items.
c. To make an item the default selection, select the Default option of the item to be pre-selected in the form.
Bundle Items
7. Repeat steps 3-7 for each bundle item you want to include.
8. When complete, click the Save button to save the bundle product.
"
reference : http://merch.docs.magento.com/ce/user_guide/catalog/product-bundle.html

Magento - How to load a set of products below, based on product selection?

I have to develop a shopping site in Magento, it will have 5 tabs.
In the first tab, I have to display 10 different products.
Based on the selection in first tab, I have to display another set of products in the second tab.
Likewise, other 3 tabs will display related products based on previous tab's selection.
Each tab will have more than 10 products
User should at least select 1 product from each tab.
Please let me know, how to achieve this? Expecting help from Magento experts.
Make 5 tabs in HTML, write a functionality to get all the products in first tab (other 4 tabs empty) when the page loads. When user selects a product in the first tab, fire an ajax call which will bring data and fill the second tab. Likewise, when user selected product from 2nd tab, fire ajax which brings data and fills the 3rd tab, and same goes for 4th and 5th tab.
So, finally, you will have to fire 4 ajax calls for reaching to the final tab. Now, you can just write one function only where you can pass the parameter with some product ID and step number, so that you can narrow down the filteration based on step numbers criteria.

How to display the products in a table format on the category page?

I have page of two columns with left bar. On the left side I have listed the categories and when I click on a category, the products display in the right column.
But there I have two options for displaying the products on the category page, one is "Grid" and the other is "list". And I want to display the products on the category page in a table form which will be my own custom table. So that it have one header row and then each row contains one product.
How will I do this?
There is such file as
(your template)/(your theme)/catalog/product/list.phtml
There you can edit your catalog template.

GUI patterns to edit data with many-to-many relationship

I often run into a situation where I need to come up with a GUI to edit data that has a n:m relationship. I'm looking for user friendly GUI ideas.
[table1]
|
/|\
[table2]
\|/
|
[table3]
Usually the GUI resembles something like this:
Grid that shows all items from table1
Add table3 item... (shows modal window with table3 items)
Grid that shows all items from table3
After the user picked a table3 item, I add a new row to table2 and refresh the grids.
Disadvantages:
You can only add table3 items to table1, and not the other way around;
You can only browse table1 items and see related table3 items;
I need to have one filtered grid of table3 items, and a similar one to pick new items;
My question:
Does anyone know a better way to visually browse and edit data that has a n:m relationship?
Or any nice patterns that I could "steal" from existing software packages?
Solution 1
If the data sets are not too big, use a table and allow users to place checks in cells (table 1 is X axis and table3 is Y axis).
You can probably do this for larger table1/3 data sets as long as you allow users to filter or otherwise limit which values are displayed on x and y axis.
Solution 2
To quote from this page, "A many-to-many relationship is really two one-to-many relationships with a junction/link table".
As such, you can, as one solution, simply take your own solution and resolve your first 2 dis-advantages by having screens/dialogs to go table 1=>3 as well as 3=>1.
Not a perfect solution but at least provides all the needed functionality
Solution 3
Somewhat similar to your own solution:
Show a table based on table1, with:
B. col1 containing table1 elements
C. col2 containing a list of all elements from table3 already associated with this element from table1.
The list can be either horizontal if there are usually few elements associated, or vertical (scrollable) if horizontal to too wide.
The important part is that every displayed element from table3 has a "delete" icon (x) next to it to allow removal quickly.
Allow choosing which element from table1 you want to add mappings to.
There are 2 ways of doing this - either add a checkbox to every row in your table, and have one button labeled "add relationships to selected rows" (wording needs improvement),
or simply have a 3-rd column in the table, containing button/link for adding relationships to that individual row.
The former is a good idea if the user is likely to often add exactly the same set of element from table3 to several rows from table1.
When "Add" button/link is clicked, you display a filterable multi-select list of elements from table3, with "add selected" button.
As in your solution (see my #2), this is a-symmetrical so you should implement a mirror UI for mapping from table3 to table1 if needed.
This is an old question, but as I faced the same problem again just now, I came up with this:
2 grids, side by side, showing table1 and table3 items, with paging, if necessary.
Both grids have a top toolbar which allows filtering by a value from the opposite table. Depending on your data and your gui framework, it can be a drop-down combo grid, or an auto-complete text input.
Both grids have checkboxes (last or first column)
Both grids contain an inline button/action on each row, to automatically filter the other grid on that item.
Only one grid is shown/marked as "active" or "master" at any given time (to make it clear to the user, which side of the relationship they are viewing/controlling).
When you select an item in grid1, grid1 becomes active and all items in the other grid have checkboxes ticked if they are associated with the selected item.
Vice versa, when you select an item in grid2 (table3), grid2 becomes active, all checkboxes in grid2 are blank (or dimmed-out) and checkboxes in grid1 indicate an association with the selected item.
The filtering part is made easier based on the inline button described in step 4.
I believe this solution would satisfy all your requirements.
Here's a possible solution, given in the form of an employees-to-projects m:m relationship. Each employee can work on many projects, each project can involve many employees.
From left to right, you show the following:
A panel showing the details of the currently selected employee.
A list of all employees, where each item in the list shows the employee's name as a clickable link or button (to display details in the detail panel). At the head of the list is a toggle button which filters the projects list to only those associated with the currently selected employee. At the foot of the list is a button to add a new employee, which display an empty details panel ready to accept input.
A vertical space in the middle with a single "Link" button allowing the user to link the currently selected employee with the currently selected project. Clicking this button would open a dialog allowing the user to enter details of the link (i.e. how long the employee is assigned, what role the eployee will play, etc).
A list of all projects, where each item in the list shows the project's name as a clickable link or button (to display details in the detail panel). At the head of the list is a toggle button which filters the employees list to only those associated with the currently selected projet. At the foot of the list is a button to add a new project, which display an empty details panel ready to accept input.
A panel showing the details of the currently selected project.
Obviously, you'd have to limit the size of the details panels, maybe by only showing the details relevant to the m:m relationship. You might even add a button on the details panel to open a more detailed pop-up window, or you might do away with the details panel altogether, if you're mainly interested in managing the links. This UI would work really well on wide-aspect screens.
HTH! Klay
Let me use the One Customer Has 0 or many Orders relationship example. If user wants to see the Orders of particular form I would suggest the following Use Case:
The User clicks the Search Customer link:
The System presents the Search Customer Form having the search criteria to filter on
The User fills the Search Criteria and hits the Search button
The System presents a list of the Customer ... by the matched criteria
The User hits the Open button in front of A Customer
The System presents the Customer ( in totally new page with "Back to Search Button ")
The new Page has 3 panels - 1 panel for Customer Details , second Panel for the list of Orders and 3 panel which gets populated when a Order is clicked. If the number of Orders is greater than 20 I would put a Search Orders link which guides to entirely new Search form for Orders with a predefined CustomerId fixed with the current CustomerId selected.

Resources