cancel
Showing results for 
Search instead for 
Did you mean: 

Can we change the stylesheet dynamically based on the webshop

Former Member
0 Kudos

Hi Guys,

The E-Commerce application we have, has 2 webshops defined and the requirement is to have a different look and feel along with completely different logos for each webshop. Can anyone point me to the right direction or give some ideas if this can be achieved in a best possible way.

One idea I thought of was to store the shopId in the session context and perform a conditional access i.e.,

If (session.getattribute("Shop") ==shop1) {

</isa:stylesheets> }

else {

// Apply stylesheet specific for shop2

}

One drawback I can think of this is I need to apply all the styles which otherwise would have been taken care by SAP's own stylesheets.

Thanks

Sandeep.K

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes we can differentiate based on the Shop Id.

Try the following code.

CreateTransactionUI ui = new CreateTransactionUI(pageContext);

OR

com.sap.isa.isacore.uiclass.b2b.CreateTransactionUI ui = new com.sap.isa.isacore.uiclass.b2b.CreateTransactionUI(pageContext);

if( ui.getBom().getShop().getId().equalsIgnoreCase("Shop Id1"){

}

if( ui.getBom().getShop().getId().equalsIgnoreCase("Shop Id2"){

}

Maybe this will help you.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for the input guys...For now I will mark the question as answered. I will re-post or reopen if the strategies we discussed does not work.

Points assigned to all

Sandeep.K

Former Member
0 Kudos

Hello Sandeep,

I have a similar requirement, and have done some initial research. See the below thread which may throw some pointers.

[url] [url]

Thanks,

Raj

Former Member
0 Kudos

hi,

This is looking very interesting one .

We can do this based on the webshop , but it will be a major development.

I also think this is the best way to achieve this

Thanks and Regards

shanto aloor