Hi CS-Cart community,
I would like to disable a menu item in a "text-link menu" called "apply for vendor account" once a registered vendor logged in and show instead "upload products" with a link to the vendor panel.
I want to have the same look and feel as the "test-link menu" also for mobile version.
I have come up with a solution that works more or less by implementing a block with smarty support.
The crucial part is the if else clause:
{if $is_vendor_with_active_company="MULTIVENDOR"|fn_allowed_for && $auth.user_type == "V"}
Below you can find the whole code:
{if $is_vendor_with_active_company="MULTIVENDOR"|fn_allowed_for && $auth.user_type == "V"}
- Produkte verkaufen
- Verkäufer finden
{else}- Verkäufer werden
- Verkäufer finden
{/if}
Currently the menu is not visible at all when accessing the webpage via mobile device. Also this approach is a bit tedious.
My idea for a better solution:
- Create two menus. One with links for user not logged in, the other for user logged in.
- Create two wrapper files, one for hiding blocks, when user logged in, the other for hiding block if user not logged in.
- Applying the wrapper to the menu blocks.
Can you let me now where I have to place the wrapper files and which code I have to implement? Better solutions are also welcome.
Thanks for your help
Jerrit