Magento 2, change behaviour of Products of Page Builder - carousel

I have Magento 2.3.4.
I want to edit Products behavior of Page Builder.
I changed the template of carousel using my child theme:
app\design\frontend\MyVendor\luma_child_theme\Magento_PageBuilder\templates\catalog\product\widget\content\carousel.phtml
Now can't edit preview.js file to change code
I tried to override the preview.js file but not work:
app\design\frontend\MyVendor\luma_child_theme\Magento_PageBuilder\view\adminhtml\web\products\preview.js
Also it is possible to edit javascript for frontend?
I want to use a different library to show carousel.

Related

JavaScript not executing after paginating through products in BigCommerce Cornerstone theme

I have a small bit of JavaScript which is not firing after navigating through paged results in a BigCommerce Cornerstone theme (using Cornerstone 6.7.0).
I've added the following to the onReady() method in the category.js file:
$('.mm-button').on('click', (e) => alert("clicked"));
This will execute on an initial page load but not after clicking on pagination links (next, prev, page number).
I've also tried moving the JavaScript into its own .js file and including it into the theme. The same behavior happens where it executes on the initial page load but not after paging through records.
The issue here is that pagination actually works by editing the content via JavaScript, so it does not run the category onReady() again. You could add the JavaScript into the page content function, but a simpler method is to simply delegate the click event. Change your code like this:
$('body').on('click', '.mm-button' (e) => alert("clicked"));

Is there a way to create tabs and mark selected tab based on page loaded in spartacus

I am using spartacus framework for storefront. I want to show tabs in my application and load pages based on selected tab. Is there any existing cms component or configuratio with which we can do or can i extent the cmscategorynavigation component and customize?
The CMSTabParagraphContainer is used on the product details page to display tabs. A CMSTabParagraphContainer can contain SimpleCMSComponents but not for example ContentPages. You would have to extend the CMSTabParagraphContainer on the backend to also accept ContentPages, ProductPages etc. and then extend the frontend components as well. To extend Spartacus components have a look at: https://sap.github.io/spartacus-docs/customizing-cms-components/
To be honest: This seems like a lot of work if you just want a visual change to the navigation

Prestashop template extends in child theme

I'm beginning to use PrestaShop so I've installed a 1.7.7.1 with the classic theme.
I have created a child theme which uses the classic theme as parent and selected it through the admin page. The website shows normally.
When creating a child theme, I'm trying to modify a small part of the product page by creating a product.tpl page in the child theme. I then try to extends the parent product page but this doesn't work, the product page just stays blank.
Here is the line in my child-theme/template/catalog/product.tpl file:
{extends file='parent:catalog/product.tpl'}
Doing so, I should see the product page as it is with the classic theme.
I've watched some tutorials and I've done the exacts same steps and it is not working properly for me. I can't figure out what I did wrong.
Thanks for the help !
Ok, that was easy, I solved my problem by deactivating the cache and choosing "Recompile templates if the files have been updated" in the advanced parameters.

Shopify: How to make a custom template editable in the theme editor?

I am using the theme "Debut" and I've copied it to make a custom theme out of it.
Then, under "Edit code" I have create a new template for "blog".
Now, when I click on "Customize" button at my template, and the theme editor opens, I have a select box in the top bar where I can select the themes templates, and the pages I've created. But I can't find my custom blog template there, to edit it via the drag & drop editor.
How can I achieve this?
Any help is highly appreciated, thanks!
Once you add any custom template for a blog, product, or collection, they are not available directly into the backend customizer in Shopify.
In backend default templates are available, you need to assign the template to a page, product or blog and then navigate to the desired page, collection or product and blog page into backend using customizer window and then you able to edit the sections and blocks that are added to custom template code.

Prestashop how to customize theme

I have bought leo_chopin theme (because client asked for it). My question is how to customize a theme from html/php/css editor and not from admin panel (it's too constricting). I wouldn't hardcode, but use hooks. This is the first time I'm using Prestashop and that style of programing... For example, where to call my own header.tpl, footer.tpl, content.tpl?
Thank you in advance for your help.
Go to your_site_folder/themes/leo_chopin/ and you will find header.tpl, footer.tpl.
You can modify these templates there or make a copy of a theme into another folder and modify it.
All content between header and footer depends on a page controller. All controllers for the front are in a folder your_site_folder/controllers/front/. ProductController.php is for product pages, CategoryController.php is for category pages, IndexController.php is for the home page etc.
You can find more in Prestashop documentation: http://doc.prestashop.com/display/PS16/Laying+the+Theme's+Foundations.