Opencart error when selecting parent category - opencart

With Opencart 2.0.1.0, I created categories. When i try to assign them parents, no category shows up.
Screenshots attached:
http://snag.gy/30giO.jpg
http://snag.gy/WmaCx.jpg
http://snag.gy/nyFrF.jpg

the autocomplete of choosing category only show the first five matches by default. Maybe you can type more character to get those categories?
Ref to: \admin\controller\catalog\category.php function: autocomplete()

Related

OpenCart 3 - Show all products in a category from a manufacturer by direct URL

[ Using Opencart 3.x]
I'm trying to make a link in the main menu to list products from a manufacturer that belong to a certain category.
Because i couln't find anything manufacturer related in the category controller, i tried to do it by also creating a category for each manufacturer like the text below, and then combining them into a link.
Manufacturers
Sony:
manufacturer_id = 13
manufacturer_category_id = 58
LG
manufacturer_id = 14
manufacturer_category_id = 59
Product category
tv_category_id = 60
The link i tried:
/index.php?route=product/category&path=59_60
But when i do this i get all the TV's from Sony, but also all the TV's from LG in the list.
Is there a way to do this right, so only all Sony TV's will be in the result?
There is no standard controller to make a link manufacturer && category. You don't need to create category for each manufacturer.
But! There is a way using standard OC3 filters.
Catalog - Filters. Here we creating filter, Filter Group Name "Manufacturer". Filter Values - "Manufacturer 1", "Manufacturer 2", ...(all your manufacturers). Save.
Catalog - Categories. Edit your category, which you would like to connect to manufacturer, i will call it "Your category". On the Data tab find Filters. Here, by entering first letters, select all filters ("Manufacturers" in your case), which you would line to link to this category. Save.
Extensions - Extensions - Modules. Find Filter, click Install, then Edit. On a filter module page set status "Enabled". Save.
Design - Layout. Find layout Category, click Edit. Add module Filter anywhere you want (for instance, under Category in Column left). Save.
Catalog - Product. Edit all product from a category you are working with. Editing the product, on the Links tab find Filters. Here, by entering first letters, select all one filter ("Manufacturer 1" in your case), which you would line to link to this product. Save.
That's all, go to "Your category" on the client side. There you will see a Refine Search module with the list of manufacturers. Check one of the manufacturers, click Refine Search. You will see the list on a products in "Your category" filtered by "Manufacturer 1". The URL is /index.php?route=product/category&path=58&filter=1. It's not a strict constant, if you adding new filters - order can be changed. But you can use it as a menu item link. Try. This should work.
Or you can use some other filter from Opencart Marketplace which can generate filtered pages with constant URL.

DropList field in WFFM is showing value in message body

we have identified an issue/functional requirement that we have a droplist of countries and same goes for title like in below image
but we need that in response email body of send email save action it's Arabic text should be used instead of English value of selected option. Is there a solution or fix ? or we have to go for any customization ?
I don't think there is a way out-of-the-box to use the text instead of value. What you can do is create a custom "Send Email Message", similar to Sitecore.Form.Submit.SendMail and override the FormatMail method.
Create a list of countries items somewhere in the Sitecore Content Tree, and add a field for the text/description of the country. Then in WFFM droplist field, Set Items by: Selecting Sitecore Items and Select Root Item to the folder of the list of countries you created earlier.
You should see the countries in the preview section. Click the drop arrow for the Value and Text fields and then either select Display name or the custom field in your country item that holds the translated values.
The value submitted in form will now be the translated value correct for the language, using the lookup items list.

Get products according to chosen value

I am creating a shop with Opencart 1.5.6 & I'm new to opencart & php so please help me
I searched a lot but all of results are talking about adding a filter in SORT drop down list like manufacturer ..
but I don't want to sort,
I added a new custom field called COLOR to product and i want to create a new drop down list contains RED,BLUE,& BLACK options and it will get all the products with this chosen color.
I tried to create a drop down list like "Sort By:" one,
but i can't because i have no experience with PHP or Opencart.
PLEASE HELP ME !! and thanks in advance :)
As you said you are beginner so just go through step by step
In Opencart there is a feature called filter which exactly fulfills your requirement
**Step1 (Creating Filter)**
Admin panel>catalog>filter>Inset a new filter
->Filter Group Name "Color".
->click on add filter and add your colors "Red, Green, Blue...."
**Step2 (Adding Filter attribute to Product)**
Admin panel>catalog>products>edit product
->under the link tab there is a filter add the filter to product you want
eg if the product is red in color add "red"
->Do this to all product you wanted to be filtered.
**Step3 (Adding Filter Scope to category)**
Admin panel>catalog>categories>edit category
->under the data tab there is a filter add the filter you want to be displayed like "red, green etc.."
->Do this to all category you wanted filter to be displayed.
**Step4 (Enable Filter module or setting layout)**
Admin panel>Extensions>Modules
->Find Filter and click on install
->Now Edit the filter
->click on add module
->Set Layout to Category, Position to Content Top and Status to Enable
->Click on Save
Now you are done, In category you can see the filter feature in category,
If you still find difficulties you can follow the official documentation http://docs.opencart.com/display/opencart/Filters
Hope this helps.

Sitecore - Validate a drop list value change event

I have a sitecore item, "category", which has a drop link which populate "product type" template list.
Each category can have a "product type".
(Products being created under a category node will be using the template selected in the drop down. e.g. Shoes category will have a Shoes template, Slippers category will also have a shoes template, Bags category will have a bags template).
Problem:
These categories should be able to mark related categories. Therefore I need to show a treelist kind of a control which only allows options to select categories with same "product type".
Under "Shoes" category, I need to have "Slippers".
How can I do this?
After selecting "Slippers" as the related item to "Shoes", if the user tries to change the "product type" drop link value in "slippers", how can I warn the user that this product type has already linked to another category?
(Validation on saving the category item.)
Hope this is a common issue with Related items in Sitecore, yet I could not find a solution for this.
Your first problem, "marking related categories" is not clear to me what you want to achieve with it.
But if I understand you correctly, you want to select a product-type-template in the Category-item to let the editor create products of the chosen producttype below the Category-item.
You can resolve this by using the item:saved event on the Category-item:
- first check if you are saving an item of type Category but checking the template.
- If it is a Category-Item, read the value of the product-type droplink and on the fly add this template to the insert-option of the Category item.
Your second problem with the check on related items can merely handled the same way by using the item:saving event. Not the item:saved event because you want to do the check before the item is saved so you can cancel the saving and display a messagebox through the Sitecore.Web.UI.Sheer.SheerResponse.Alert() method.
In the item:saving event you need to check if the current item has 1 or more referrers (items that link to this item) through the LinkDatabase method Globals.LinkDatabase.GetReferrers().
Using validation on this instead of the item:saving event is not usefull because the validation event only throws a warning and saves the item anyway.
Another good link with example code is this blog of John West.

Mediawiki dropdown value: from category + none

In mediawiki, I made a form with some dropdown lists that get their values from a category:
{{{field|Managers|mandatory|input type=dropdown|values from category=myTeam}}}
This works, it will show me a list of everyone in my team. However, somehow it should be possible to select "none", which is not in my category (duh!). Can someone tell me how to I can add an extra value to this dropdown list?
Create a page named None and populate it with [[Category:myTeam]] seems the simplest solution based on your details.