Displaying extra field - specification in store front end - opencart

I have added an extra field Specification in Catalog->Product->Data tab.
This text is stored in a column called specification in product_description table.
Now I want to display this information in my Store Front (default theme). On product page there is a tab Specification that displays attribute. I want to display specification instead of attribute.
Please suggest me how to do it :(

First: edit Your Product model - should be in catalog/model/product/product.php - find the method getProduct and edit the SQL that selects the product details to also get the specification column.
Second: edit Your Product controller - should be in catalog/controller/product/product.php and make sure that Your specification column will be added to $this->data['specification'], e.g.
Third: edit Your Product detail template - should be in catalog/view/theme/default/templates/product/product.tpl and find that part where <div class="tabs"> (or similar) is - then find the tab for specification and print out Your specification column here...
Should be done.

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.

Making hidden field visible when another field is used

I am trying to create a section in my models code that allows me to add a value only when the previous field is selected.
The goal of the code is to do the following
Have a null or blank option
Select an option from the tuple
Showing the new field option
The example of what I am looking to do is add a warranty to an item in my model. I am trying to make a date field (or a charfield that uses a date format) that only appears when an option is selected (i.e. a date field is available when the 30 day warranty is selected) otherwise the date field should be hidden (i.e. none is selected, so date field does not show)
Any suggestions, workarounds are welcomed
This is in Django Admin only

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.

change sequence vtiger basic field in contact add form

I want that field should enter first and then other field . i am try through move the location in edit layout option and save the sequences. but when i click on add contact the set sequence not view in create contact form.
can you guide thee process for change the sequences of basic field .
Thanks & regards
Nitesh Shah
if you are not bale to change the field order from layout editor, then change the value of column "sequence" in vtiger_field table

Create Template Custom Field Field in Sitecore

I want add a custom field in a Sitecore template.
Field will be a drop down of hours (1 -23) and used to show open and close time.
Ex: 8am to 7pm.
How can I add a custom field for that?
You can use a droplist field and set it's datasource to a folder that contains numbered items 1-23.
You could also just use a plain text field and optionally add a validator, or a date-time field if you actually want the time (+date) formatted.