sdinesh86 Posted February 7, 2016 Share Posted February 7, 2016 Hello All, I a new to prestashop and this whole eCommerce thing, so please bare with me if i sound silly. I need to build a small product customizer, where user would be able to make his / her own product and then add it to the cart and purchase it. I want this to be a different dedicated page, I would be using JQuery and some other js libraries with AJAX to create this customizer, I need some guidance on how to go about building this. how should i make this happen, Should I add this as a page to the core Or should I create a module for this and add it I am currently looking at making this as a module, but I am bit confused on how to create a dedicated page and display it in their Can anyone guide me to documentation / tutorial / articles as a kickstart. Thanks, Dinesh Link to comment Share on other sites More sharing options...
yaniv14 Posted February 8, 2016 Share Posted February 8, 2016 Module will be the proper way but I think you might achieve it better if you make some overrides to product page instead of creating a new controller. Product page (ProductController) comes with allot of important data related to adding product to cart. But anyway you can check this tutorial (kinda old but still good enough) http://nemops.com/creating-new-pages-in-prestashop/#.VrfzxPl97IU Link to comment Share on other sites More sharing options...
sdinesh86 Posted February 8, 2016 Author Share Posted February 8, 2016 I checked the tutorial and some others too on that site, didnt knew such tuts existed I now have a basic module up, with a link on the nav and a page. but now I am not able to include script files in the head tag, I tried including the js files using the $this->context->controller->addJS(($this->_path).'js/MYJSFILE.JS') if the setMedia function in the controller and header hook still no luck. any help Link to comment Share on other sites More sharing options...
yaniv14 Posted February 8, 2016 Share Posted February 8, 2016 Try to load the css & js from initContent() and make sure you get the correct folder. You should try to print_r the path you are trying to get. Also I think you need $this->module->_path or you can also try to create the path with: _PS_MODULE_DIR_ . 'your_module/views/js/yourjsfile' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now