Jump to content

brys

Members
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Activity
    Web development agency

brys's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. My form looks like this How do you make it look similar to the built-in forms in Prestashop?
  2. I have new kontroler FrameworkBundleAdminController in prestashop 1.7 I display in them, for example, a form generated by HelperForm, but the bootstrap styles are missing to make the form look similar to those of prestashop. What am I missing? class CustomizeController extends FrameworkBundleAdminController { public function __construct() { $this->bootstrap = true; $this->display = 'view';} public function addAction($productId) { return $this->render('@Modules/rolety/views/templates/admin/customize_form.html.twig', [ 'customize_form' => $this->renderForm(false,$productId) ]); } } Theme customize_form.html.twig {% extends '@PrestaShop/Admin/layout.html.twig' %} {% trans_default_domain "Admin.Design.Feature" %} {% block content %} <div class="row block"> <div class="col block_content"> {{ customize_form | raw }} </div> </div> {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}
  3. But i use controler which extends FrameworkBundleAdminController I have error 500
  4. In prestashop 1.7.5 I have an admin controler which extends FrameworkBundleAdminController. Now I want to download data from my table in this controller and display it in the grid (table) in a similar way as customer data or their addresses are displayed. How do you do it in a twig based template? Unless you can do it differently using a helper.
  5. How to add your own Admin Controller in prestashop 1.7 module. I create file width my controller. Can it be added with the include function or is there a better way.
  6. In my module Prestashop 1.7.5 I want to override the product list view in the admin panel. I copied src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/list.html.twig to mymodule modules/mymodule/views/PrestaShop/Admin/Product/CatalogPage/Lists/list.html.twig In list.html.twig is code: {% set buttons_action = [ { "href": product.preview_url | default ('#'), "target": "_blank", "icon": "remove_red_eye", "label": "Preview" | trans ({}, 'Admin.Actions')} ] %} How to change href this code to my controller from mymodule sample: /admin/index.php?controller=AdminMyControlerSample&token=c21c6d1372a6950e4cb9ef9e01aa7124 and action name: "hello" it is best to generate this link dynamically, especially the token and the domain of the store was attached.
  7. I know this module. But I need to do my own similar solution, but there is very little information on this topic.
  8. Hello. In prestashop 1.7 I want to do product customization. To this end, in my module when adding a product to the basket, I want to add my values as a customization. As far as I know, prestashop 1.7 has changed a bit and you can add customization associated with the module. How to make the product receive additional customization from the module?
  9. In Prestashop 1.7.5 I added in my module 3 fields type input: price, width and height which I display on the product page in the displayProductAdditionalInfo hook. Now I want to send them to the ProductController. In my javascript, after changing the values in the above fields, I call prestashop emit on the onchange event prestashop.emit('updateProduct', { reason: { price: price, width: width, height: height } }); This calls the product controller but only sends id_product and quantity - qty I would like to send my input: price, width and height?
  10. On the product page in prestashop 1.7 I added a check box which changes the price of the product depending on the selected option. How to dynamically update the displayed price depending on the selected option using javascript?
  11. Currently, I really need how to change the "href" parameter in list.html.twig to point to my controller in the code {% set buttons_action = [ { "href": product.preview_url | default ('#'), "target": "_blank", "icon": "remove_red_eye", "label": "Preview" | trans ({}, 'Admin.Actions')} ] %} My controller sample: /admin/index.php?controller=AdminMyControlerSample&token=c21c6d1372a6950e4cb9ef9e01aa7124 and action name: "hello"
  12. I have to insert it directly in the file /controllers/admin/AdminProductsController.php ? I send screen where I want to put this action. It's about the list of products in prestashop 1.7.5 in the admin panel
  13. In my module Prestashop 1.7.5 I want to override the product list view in the admin panel, and more precisely, I want to add an additional action of my controller for each of the products on the list. Where there are actions View, Delete duplicate. I copied src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/list.html.twig kopiując to mymodule modules/mymodule/views/PrestaShop/Admin/Product/CatalogPage/Lists/list.html.twig And how do I add my action stick to my controller now? I see that there is such a code, but I do not know how to insert a link to the action in my controller, preferably with the id_product {% set buttons_action = [ { "href": product.preview_url|default('#'), "target": "_blank", "icon": "remove_red_eye", "label": "Preview"|trans({}, 'Admin.Actions') } ] %} {% set buttons_action = buttons_action|merge([ { "onclick": "unitProductAction(this, 'duplicate');", "icon": "content_copy", "label": "Duplicate"|trans({}, 'Admin.Actions') } ]) %} {% set buttons_action = buttons_action|merge([ { "onclick": "unitProductAction(this, 'delete');", "icon": "delete", "label": "Delete"|trans({}, 'Admin.Actions') } ]) %}
×
×
  • Create New...