SmartEdit : custom footer layout not editable all time - spartacus-storefront

We created a custom footer layout which contains many slots :
The new footer is editable and working as expected on Staging environement, the contract added for all slots inside footer and we have possibility to edit, remove ... componenets.
On production, the footer is unstable, sometimes the contract is added only to the OOTB slot (FooterSlot), the blue overlay is missing for all other slots (custom Slots)
Note sur but I think the same issue happen for the custom Header.
Same Data (slots, componenets...) exists in boths environement (Staging & Production)
Additional Informations :
Spartacus shematics : 4.3.1
SAP commerce cloud 2005
SSR enabled
Any ideas why the FooterSlot is editable always while custom slots are not ediatble all time ?
Expected behavior :
all slots inside the custom footer are editable all time

Related

Vue JS keep tab component alive

All,
I need some help making keepAlive in VueJS3 composition api work.
I have a page to configure profiles ( business feature ) where I have some tabs created dynamicly based on user selection from a drop down.
Here is my profile model :
So Each tab is an entry to the realm attribute array.
The VTAB component I am using is from vuero library : https://vuero.cssninja.io/
That I am using this way :
While making modifications, the user should be able to switch tabs without losing the modification he made while switching tabs.
From official documentation, keepalive is the directive to be used for such use case. Unfortunatly I am not able to make it work. I lose all the modifications when I switch the tab.
Do you have any suggestions, to make this work .
Thanks A lot.
It seems to be a limitation from vuero component.
I went with a cutsom solution. By listening on the onBeforeUnmont

How can I use Vue 3.x in Shopify theme editor?

From this Shopify article Integration with the theme editor, it said that:
When merchants customize sections, the HTML of those sections is dynamically added, removed, or re-rendered directly onto the existing DOM without reloading the entire page.
JavaScript that runs when the page loads will not run again when a section is re-rendered or added to the page. This poses a problem for any custom scripts that would need to be re-run.
I am trying to use Vue 3.x in Shopify theme sections. When a section setting is changed, the section variable is changed (like {{ section.settings.button_color }}. However, the js is not run again, how can I load this updated section value into Vue app?

Custom pageoutlets are not editable in SmartEdit

I have created a custom outlet and placed it in app.component.html
<app-outlet></app-outlet>
<cx-storefront>Loading...</cx-storefront>
The template app-outlet.component.html contains
<ng-template cxOutletRef="CustomOutletSlot" cxOutletPos="replace">
// this replace outlet works in storefront
</ng-template>
In storefront, the pages are loading as expected.
Sure, it also shows in SmartEdit, but the contextual menus Drag & Drop, Edit, and Remove are not showing?
Are there any workaround for this? I still need to use the custom outlet in my case.
SmartEdit is about managing CMS Components and Content Slots. It works against backend data structures supported by SAP Commerce: pages have content slots, and content slots contain components. When you modify via SmartEdit, you are updating the content slots, the components, and the relationships between them.
When you are using a custom outlet ... that is not a data item understood by the backend CMS functionality. There is no data element in the backend for SmartEdit to manipulate.
If you want to have this item manageable via SmartEdit - you will need to create and use CMS Content Slots / Components

Custom Hooks in Prestashop 1.7

I try to create a custom Hook for Prestashop 1.7.0.3 for the slider module. I insert:
displaySlider:
- ps_imageslider
on theme.yml file on block “hooks”.
Then insert:
{if $page.page_name == 'index'}
{hook h='displaySlider'}
{/if}
on theme/templates/layouts/layout-both-columns.tpl file between header and section id=”wrapper” tags. According to this article: Custom Hooks in Prestashop 1.7 everything will work ok but the hook is not shown on available hooks when i try to change slider module position from the backend.
I was working today on the same issue.
And i succeed to make it appear, it is probably not the good way and i hope it is not the good way because it is weird.
In your theme.yml you have to set your hook like this :
global_settings:
hooks:
custom_hooks:
- name: displayFooterBefore
title: displayFooterBefore
description: Add a widget area above the footer
And if you wanna see your hook in the position page, you have to switch to a other template and back to your one. (Kind of refresh)
You can also check the incomplete doc from Prestashop :
http://developers.prestashop.com/themes/hooks/index.html
I hope there is a another way to refresh hooks in this page...
So just to be clear. To add a new hook in Prestashop.
In \themes\yourTheme\config\theme.yml you add
custom_hooks:
- name: displayYourCustomHook
- title: displayYourCustomHook
- description: This is a Custom hook
In the same file, in the section modules_to_hook:
displayYourCustomHook:
- ps_moduleIwantoHook
- ps_anotherModuleIwantToHook
Wherever in your .tpl files you want to add your hook:
...
{hook h='displayYourCustomHook'}
...
Finally, from you backoffice, you change from your current theme to a differente one, and then save. After that, you change to the previous theme (the theme you actually want to use), save again and your hook should be visible. This is done with the aim of "refreshing" the hooks that your Prestashop site recognasizes.
This is working in Prestashop 1.7.7
I spent a lot of time looking for why my custom hook did not appear on the front, thanks for the tip.
In order to improve the process, you can use the reset button in appearance > themes & logo.
This avoids having to activate another theme.
I see I voted myself for the accepted solution 2 years ago, but now came up with a much better solution.
According to Prestashop 1.7 hooks doc all you have to do is to register your hook as any other normal and it will be automatically created. So paste something like:
$this->registerHook('displayAtSpecificPlace');
in your module install() and reinstall the module.

Does the OpenERP version of ReportLab's RML support frames?

I want to add a sidebar or a header to some of my reports in OpenERP. The ReportLab user manual (PDF), describes the <frame> and <nextFrame> tags. Are they fully supported in OpenERP? I've gotten some things to work, but one frame just flows into the next, so a report that takes more than one page ends up with overlapping text.
After a bunch of digging in the code, I have frames working in OpenERP 5.0. The key feature I had to find was the last="true" attribute for a frame definition. That means that the frame should assume it's the last frame on the page. Any text that overflows it will flow to the first frame of a new page, not to the next frame on the current page. I ended up setting it true on all my frames. To see an example with frames, here are some snippets from our balance sheet report.
<template
pageSize="(8.5in,11in)"
title="Test"
author="Zaber Technologies Inc."
allowSplitting="20">
<pageTemplate id="first">
<frame
id="first"
x1="1.3cm"
y1="0.2cm"
height="27.5cm"
width="14.0cm"
last="true"/>
<frame
id="upper_right"
x1="14.1cm"
y1="21.53cm"
height="5.2cm"
width="5.0cm"
last="true"/>
</pageTemplate>
</template>
This section specifies your page layout. By default, text will start in the first frame in the list. y1 is the distance from the page bottom. You can specify a page template in two places: within the report itself, or within the headers defined in the company configuration. If you use a header, the report's first page template will be replaced by the header's page template, so the report's template can just be a pageTemplate tag with an empty frame tag in it. The company headers can only use one page template, but each report can define more than one page template.
When you want to put something in one of the other frames, use setNextFrame and nextFrame.
<setNextFrame name="upper_right"/>
<nextFrame/>
You don't have to use the frames in order. You can switch to an earlier frame in the list, and it won't start a new page.
For more details about changing the header, see the documentation or the question on user-defined headers.