Reputation: 213
I'm using opencart v.1.5.1 How do I add extra text area on opencart checkout page?
I've added Step 6 using photoshop, how do I code that on opencart?
Upvotes: 1
Views: 6762
Reputation: 22523
I don't know about your programming background, but you need to be a little bit more than familiar with PHP, AJAX, JavaScript and of course MySQL, you should also know about the MVC architecture. If you think you have enough knowledge of those then here is what you need to do: Create a controller class and name it lets say "remarks"
class ControllerCheckoutRemarks extends Controller {
public function index() {
// Your code
}
}
add the code you need to process the data, you can get some ideas by looking at "checkout/guest/shipping" controller class. What you need is quite similar to what that class does. if you need to interact with the database in order to process the data then you need to create a Model class in the same route under the Model folder and write your functions in it. again you can get the idea from other model classes. But I don't think you need this, probably you want to add this information to your order, in order to do that you should modify the Order class, both Controller and the Model !
Finally you need to create a template file for it, once again open the template file for "checkout/guest/shipping" and see how they did it, then you create your own.
For the controller and model classes make sure you name them properly. There is one more thing you need to do, The controller class for the step 5 sets the redirect to the next step which by default is the Confirmation. Change this line and make it redirect to your section and do the same thing for the new section and redirect it to Confirm:
url: 'index.php?route=checkout/shipping'
I can only guide you what to do, how to do it is your job :D If you are a programmer then I don't think you'll have any problem with it. if you're not i guess you'll need someone to do it for you :)
Upvotes: 6