{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_body %}
{% if app.request.get('dmits-cart') %}
hello
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block base_script_hmr_mode %}
{{ parent() }}
<script>
const data = JSON.stringify({
items: [
{
type: 'promotion',
referencedId: 'sss'
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '/store-api/checkout/cart/line-item');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json');
xhr.setRequestHeader('sw-access-key', '{{context.salesChannel.accessKey}}');
xhr.setRequestHeader('sw-context-token', '{{ app.session.get('sw-context-token') }}');
xhr.send(data);
var dmits_customergroupprice_active="0";
{% if context.customer && config('DmitsCustomerGroupsPriceApp.config.isActive')=="1"%}
var dmits_customergroupprice_active="1";
{% endif %}
var dmits_customergroupprice_shopid="{{appShopId}}";
var dmits_customergroupprice_saleschannel="{{context.salesChannel.id}}";
var dmits_customergroupprice_token="{{ app.session.get('sw-context-token') }}";
var dmits_customergroupprice_productname="{{ "dmits.customergrouppriceapp.discountproductname"|trans|raw }}";
var dmits_customergroupprice_savedText="{{ "detail.listPricePercentage"|trans }}";
var dmits_customergroupprice_percentageRounding="{{ config('DmitsCustomerGroupsPriceApp.config.percentageRounding') }}";
var dmits_customergroupprice_showSaving="{{ config('DmitsCustomerGroupsPriceApp.config.showSaving') }}";
{% if controllerName|lower=="checkout" && controllerAction|lower!="finishpage"%}
var dmits_customergroupprice_currentpage="{{controllerName|lower}}";
{% else %}
var dmits_customergroupprice_currentpage="";
{% endif %}
var dmits_customergroupprice_numberTemplate="{{100000.00|currency}}";
</script>
{% endblock %}