Prestashop 1.7 hook displayCarrierExtraContent not working in admin while creating new order - prestashop

I am using prestashop 1.7.8.7 and on front end on checkout page i'm using this hook displayCarrierExtraContent to show extra carrier content.On Front end this hook works fine. Here is the front end screenshot https://prnt.sc/XWalq-7uPm09
But how we can achieve same functionality in backend while admin create new order from backend ?
It seems that this hook displayCarrierExtraContent work only on front end but not in backend.
Here is the backend screenshot https://prnt.sc/iLuTP707p8yO
Is there any hook so that we can achieve same functionality in admin also while creating new order ?

Related

Prestashop module development: How can we save data from product page?

I'm here for help from those who have real experience in Prestashop module development.
I got stucked while saving data from the product page where I've created the field through the module via hookDisplayAdminProductsExtra.
And I didn't get an idea to save new field data from the admin product page.
So, please help if anyone has a solution for this.
Thank You.
Add a form in your hook returned TPL,
so that you can retrieve and save your custom data in DB by registering and triggering "actionProductUpdate" in the module (this hook is called when a product is saved) by using Tools::getValue() inside the hook on your POST data.
Other solution would be to save data in AJAX with a dedicated AdminController - You can insert a custom button in your TPL + an additional JS file (you can include it with hookBackofficeHeader) to trigger the AJAX call.
You can see more about AdminController in official devdocs.

How do I return a partial, not a view, to the front end? Can I return a partial without a page refresh?

So I'm working in express and using hbs as my view engine. I want to make a fetch call from the front end passing form data to my express server. I then want to send a partial with the data sent from the front end to the front end so only that section of the page is updated. Also I want the page to not refresh so I want it to be asynchronous. Is this possible and, if so, how can I do this?
I tried the same long time ago with ajax/jquery, and It could be exausting, extense etc, I recomend to you use vue, react or angular, to handle your front end.
If you want to continue with this you can see this answer:
express.js how to update UI without refresh all page using handlebars

Shopify - Product filter with parameter

I am looking for custom product filter using my custom Shopify App. I have created an app like structure and which is append to the product collection template.
How can I pass custom parameters like price, category or product attributes via URL or how it will render the product on the collection page.
Thanks,
Navas
If you created an App, you can add a Proxy to it. The Proxy allows Shopify to send secure data to your App via a Javascript call. You get the data from the shop about the product, you filter it, and you return JSON data if you want, to help the front end. Works great. Try it.

Shopify api: add a link

I am developing a shopify app.
Is it possible to add a new link to the main menu via the shopify API?
Thanks
If you log in to your partner account and then create an App you can edit the created App and you will see all the resources at your disposal where you can add a new link.
If you notice also, using the API you can pull and rewrite any asset in a shop to contain a new link. This is discouraged as bad practice. Instead, inject a script tag that does the dirty work.
Soon as I know the API itself cannot change something inside the theme files... some APPs ask you to apply some code manually in the theme, with proper instructions... maybe this code could add the new menu or dynamically interact to get it.

Script Tags in shopify checkout

I'm looking at developing an app for Shopify which will add functionality to a store's checkout page. It would be ideal if the user didn't have to copy and paste code into files themselves hence I was looking at using the ScriptTag API ( http://api.shopify.com/scripttag.html ) to include a custom javascript file.
I've worked through some of the examples on the aforementioned API page and can get a custom script included on every page on my test store except for the checkout page. I've changed the src to start with 'https://' as suggested by the tutorial but my script still doesn't run or even appear in the page source for the checkout.
Does anybody have any ideas how I can get this working for the checkout? Is what I'm trying to do even possible?
The only page of the checkout that script-tags are loaded into is the Thank You page that appears after an order has been completed.
The pages for steps 1 & 2 of the checkout cannot have script-tags added to them for security reasons.