Reputation: 17
I need the code that allows you to view different content from the b2b shop to the retail shop. version prestashop 1.7.3
Example:
{if $shop_id == "2"}
content... {/if}
but this doesn't work. someone help me? thanks
Upvotes: 1
Views: 135
Reputation: 340
Context::getContext()->shop->id
This is not for B2B settings, but for multistore feature. For B2B is:
if (Configuration::get('PS_B2B_ENABLE')) {
Upvotes: 0
Reputation: 174
You have several options to do so. It would be best to create a global variable in the header hook so that you can use it throughout the frontend. You can also do it like this.
{ if Context::getContext()->shop->id = 2}
Upvotes: 0