i want to edit/Modify the labels under Category in Magento 1.9 Back-end.
here is the image for your reference.
Those are Labels for Attributes of catalog/category model.
You can edit them via Setup script or directly in the database.
This will give you a complete overview of category attributes:
SELECT * FROM `eav_attribute` WHERE `entity_type_id` = 3
Labels are stored in field frontend_label
I honestly have no clue why someone would want to change those labels.
If your goal is to translate them, then this is a wrong approach. For
translation use locale files instead.
Related
I am creating a website and it contains query form which includes timezone dropdown .
How can we add time zone drop down using Contact form 7 ??
Attached is output I want.
Thanks in advance!!
You can use the wp_timezone_choice function available within WordPress. This function returns values in <option> form so you can use something of below sort:
<select>
<?php echo wp_timezone_choice( '' ); ?>
</select>
Please note that I have passed empty string so that user can select an option. If you want any timezone to be preselected then you can pass the same timezone instead of empty string.
First of all you will need a timezone database. There are several which you can google for or donwload one from here.
Next import your data into WordPress, if you have a CSV file you can use the plugin Really Simple CSV Importer to import the timezones as a taxonomy for example.
The other option is to import the data as a separate table in your DB, it all depends on how you want to manage the data. If you want to be able to differentiate timezones between different continents/countries/regions then best to store them as a taxonomy and create parent terms for each region you want to differentiate.
Next to display them in your form, use the dynamic dropdown field available with the Smart grid-layout extension plugin.
The dynamic dropdown allows you build a select field using either a list of terms from an existing dropdown (see this video tutorial on how to use it) or using a custom filter and programmatically building the list (see this tutorial) using your database custom table if that's the way you imported your timezone data.
Last but not least, the dynamic dropdown also allows you to transform your select field into a select2 field which is handy for large lists as it allows your users to search for a particular timezone.
I have the following scenario centered around the relationship between 2 models: Assets and Activities.
Many Assets can be INPUT of Many Activities at parallel times.
Having that in mind - I want to create UI, which allows me to:
from the perspective of Activity:
add Assets as related to the Activity into a table by selecting them from an existing table of Assets showing all created Assets.
Be able to remove the relationship by clicking a button (which would not delete the whole record in the table).
Please help. Thank you in advance!
I tried binding custom code to an onClick event to a button, which is on the same row as the Asset record I would like to un-relate from an associated activity:
var index = widget.root.datasource.item.Assets.indexOf(widget.datasource.item);
widget.root.datasource.item.Assets.splice(index, 1);
This returns:
Cannot read property 'indexOf' of undefined
at Strategy_TableView.Panel1.Table2.Table2Body.Table2Row.Button5.onClick:1:51
I also have yet to try to find a way to add existing Assets to the related to Activities table.
Suggested code edits to get this working correctly would be:
var datasourcerelation = widget.root.datasource.relations.Services;
var index = datasourcerelation.items.indexOf(widget.datasource.item);
datasourcerelation.items.splice(index, 1);
For whatever reason referencing datasource.item.Services in relation to JS array functions does not give you the result needed. I am not sure why this is, but you have to use datasource.relations.Services instead.
In regards to adding to the relation use:
var datasourcerelation = widget.root.datasource.item.Services;
datasourcerelation.push(widget.datasource.item);
Note that in the case of adding a relation datasource.item.Services works fine. I am not sure why this is different.
I have to build a product repository in pimcore. I have clear design of database but I do not know how make it in pimcore in recommended/optimize way.
Category :
id
name
Attribute :
id
cat_id
name
Product
id
cat_id
name
ProdAttributes
id
prod_id
attr_id
attr_value
I can build Object classes for all and set relation within them, But if that is recommended way ?
Also I need to build REST API for inserting & fetch data. I assuming I need to do some ZF1 DB code instead of using pimcore Object API ?
I'd highly recommend using pimcore's GUI. That's the best way.
Ad REST: there's allready an RESTful API in pimcore. You can find the documentation here.
If you need more you'll have to build your own. I've put mine on GitHub. It fetches data from an object and returns them via JSON or XML - maybe it helps.
So I already have a database setup with a few columns and a few rows already inserted in. I'm trying to create a view that you would just input information into a form and press Submit, then a row would be added to the MySQL database with the information you just typed in.
I believe you can do this with admin, but I would like to try without admin and I'm not sure if this is possible? I've been using the MySQL commandline to add rows as of now..
Of coures this is possible this is a building block for data driven websites. You can use a ModelForm as Daniel suggested (they offer built in validation and HTML markup for FREE) to easily map your model to a front end form. It would probably be beneficial to start with django tutorial or documentation first.
At the the very basic, all you have to do is instantiate your model
new_entry = YourModel(name='me', age='222', about='stackoverflow')
then save it
new_entry.save()
This adds it as a new row to your db.
https://docs.djangoproject.com/en/dev/topics/db/models/
Why would it not be possible?
You probably want a modelform (but see the general form introduction first).
Try out this example of Generic Views: http://postneo.com/2005/08/17/django-generic-views-crud (assumes a model named Task)
With Generic Views you get Insert, Update and Delete for free without any real work. give it a try and let me know what you think.
from django.conf.urls.defaults import *
info_dict = {
'app_label': 'tasks',
'module_name': 'tasks',
}
urlpatterns = patterns('',
(r'^tasks/create/?$', 'django.views.generic.create_update.create_object', info_dict ),
(r'^tasks/update/(?P<object_id>\d+)/?$', 'django.views.generic.create_update.update_object', info_dict),
(r'^tasks/delete/(?P<object_id>\d+)/?$', 'django.views.generic.create_update.delete_object', info_dict ),
)
Django Docs: https://docs.djangoproject.com/en/1.2/ref/generic-views/#create-update-delete-generic-views
I have a mediawiki with different type of categories.
If a page has 2 categories
[[Category:Pear]][[Category:Strawberry]])
I want to add a third category
[[Category:Fruit_Salad]]
Is it possible to do that automatically? (using a bot for instance)
Edit: In fact, what I need is an API for categories
a way to read the category
a way to add a new category
The rest can be done by any program
You are probably looking for the pywikipediabot framework. (Check catlib.py for the category manipulation code, and category.py for an end-user-friendly mass category modification bot.)