I want to create a Custom Shipping Method on Checkout Page and when customer will select that Shipping Method, it should display a new text field and allows customer to enter in the text field. That text field value should be shown everywhere in the admin, emails etc.
Can anyone please me in this or any right direction to achieve this.
Any help will be really appreciated.
Thank you
You need to create a module. Here you have an easy example to create a new shipping method:
https://inchoo.net/magento/custom-shipping-method-in-magento/
To add the field you told, you should add a new column to database. Depending on the content of this field and how you will retrieve this information you could add this column to sales_flat_order or sales_flat_shipment.
Here you have an example to do this:
https://magento.stackexchange.com/questions/9751/adding-custom-fields-to-sales-flat-order
Adding this feature to the custom shipping method should be enough.
Hope it helps. Regards.
Related
I'm sorry if my question sounds confusing.I just started learning web2py recently,in this exercise I'm trying to make a simple users management webpage with the admin can assign the users theirs work lists,note and deadline
db.define_table('auth_manager',Field('name','string',requires=IS_NOT_EMPTY()))
db.define_table('manager',Field('user','string','reference user.name'),
Field('workname','text',requires=IS_NOT_EMPTY()),
Field('deadline','date'),)
db.manager.deadline.requires=IS_DATE_IN_RANGE(format=T('%Y-%m-%d'),
minimum=now,maximum=now+datetime.timedelta(60))
I thought of adding the manager's username in auth_manager table using appadmin's new record function.This is my user table
db.define_table('user',Field('name','string',requires=IS_NOT_EMPTY()),
Field('password','password'),
Field('workname','text'),
Field('deadline','date'),
format='%(name)s')
I wanted to insert workname and deadline into user table right after I add those form on manager but I couldn't find any other methods except the update or update_or_insert functions but both don't work because those fields can't be empty and their ids aren't the same value and multiple references to a single table don't work .
One last question,I want to use web2py's RBAC but the first & last name fields are often unnecessary if I want to use a full name field is there other way to do it?
Sorry for the long post,I hope I made my question clear.
You can use the tables from auth and let web2py to handle everything in between.
The following code should resolve your problem:
db.define_table('manager', 'reference auth_user'),
Field('workname', 'text', requires=IS_NOT_EMPTY()),
Field('deadline', 'date'))
Scenario:
I have an autocomplete country widget. So when:
I start typing a country name in the textbox, the countries that match that query appears. Lets say I type "Co" and it shows me "Colombia" and "Congo" in a list.
Then I select "Congo".
When I select Congo I want to call a Widget/Container/vtl file/whatever that brings me the information I want formatted the way the widget is formatted. Lest say, all the info of the Congo, Location, Population, a brief description, etc.
I tried with the RestAPI and thought of using dotParse()? But I'm new on this I have no idea if this is even possible. I searched in the docs, but didn't find anything similar.
So how can I do this possible?
I have the Widget created, do I only need to call it via the RestApi?
Do I have to create a Container first?
Thanks in advance, for your help.
Thanks i
It sounds like what you want is the RESTful widget API. This is a remote call that will return your widget rendered. See:
http://dotcms.com/docs/latest/WidgetAPI
and
http://dotcms.com/docs/latest/remote-widgets
I'm designing a database to track requests. Currently, I have a form that its' record source is based off a query "Unassigned Requests". This query is based off my table Requests, and returns all "unassigned Requests". In this form, I would like the status field to change to "Assigned", once a Tech field has been assigned to the request. I currently have the Default for the Tech Assigned field set to "Blank', and the status field set to 'Unassigned". Both of these fields are combo boxes. The status field has a control source from the request table and row source from the status table. The tech assigned field has a control source from the Tech table and the row source is based off a query.
I have tried multiple solutions that have not seemed to work. I have limited experience with Macros and VBA. I would appreciate any suggestions on solving this problem.
I am going to make some assumptions regarding your post and if any are incorrect please let me know.
You have a request form where a request is assigned to a Tech. On that form there is a dropdown for the status, and also for the Tech.
You want to make it so when the tech dropdown is filled out with a tech's name you want the dropdown to change to assigned.
If this is the case I would recommend using the Tech Assigned field's AfterUpdate event. The code would look something like this:
Private Sub cboTech_Assigned_AfterUpdate()
If Nz(Me.cboTech_Assigned.Value, "") <> "" Then
Me.cboStatus = "Assigned"
Else
Me.cboStatus = ""
End If
End Sub
Obviously you will need to adjust to your own naming scheme. I should also point out that I don't even know if that Nz function is needed, I have just gotten into the habit of putting it everywhere. If I misunderstood something about what you want to do please let me know!
Pretty new to Infopath here and I can't seem to google this right so i'm going straight to my last option!
I'm building a form in which a Dropdown list needs to change dependant on the value of another dropdown list
So If X = 1, Then Y = 3 etc.
I'm just not aware of the functionality of Infopath and how I can get something like this working.
Thanks.
What you are looking for can be described at the following post:
Auto-populating an Infopath form after selecting a drop down
Essentially you will be using the rules manager to indicate that when a field equals something it will populate another field with data related to it. Think of it as more complex vlookup. Additionally, the verbage you would want to use to google more on the subject would be along the lines of "infopath auto-populate field based on another fields value".
I need to design database with frontend as HTML.
This is my first attempt to do this.
What I need is,
- User can input a word from HTML page, click submit
I will query the word to get a URL from database and user sees that webpage(pointed by URL).
Just enter word, submit and get the webpage displayed.
People suggested using JSP/Access. I am new to everything.
Can you please point out what exactly I need to do?
Thanks a ton.
Following is the way you need to approach
Step1:
Create an HTML page which can take an input from the users
Step 2:
After getting the data from the user, create a connection to the database and pass the searched string as an input paramater.
Step 3:
You will get a result set from a database
Step 4:
Iterate through the result set and display in the html page, if you require the url to be given for those url, so when user clicks So that he will be directed to those websites.
Sample Query:
Select * from table1 where url_Word like '%Search_String'
This will be the procedure that you need to follow to complete your work.
You do not need a database you need a text file. If this is a school project you need more information.