Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Detect The Vendor Page? Rate Topic   - - - - -

 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 55 posts

Posted 18 April 2019 - 11:36 PM #1

how can we detect the vendor page? 

 

something like this.. 

 

if controler == "vendor-page" {

//do something..

}

 

 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19161 posts

Posted 19 April 2019 - 06:14 AM #2

What do you mean by vendor page? Vendor area in the admin panel or vendor microstore in the store-front?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 667 posts

Posted 19 April 2019 - 07:12 AM #3

Hello

 

{if controler == "companies.products" {

//do something..

}

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 55 posts

Posted 19 April 2019 - 08:11 AM #4

What do you mean by vendor page? Vendor area in the admin panel or vendor microstore in the store-front?

 

Inside the micro store.. I'm trying to check it in tpl using smarty like so {if vendor url is vendor store} //do something.. {/if}



 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 55 posts

Posted 19 April 2019 - 08:13 AM #5

 

Hello

 

{if controler == "companies.products" {

//do something..

}

 

Best regards

Robert

 

 

Thanks a lot, this works for scripts.. can i do it in the tpl file like so {if vendor url is vendor store} //show class {else} //hide class {/if}



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 667 posts

Posted 19 April 2019 - 10:55 AM #6

Hello

 

{if $smarty.request.dispatch == "companies.products"}

    //something

{else}

   // something

{/if}

 

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19161 posts

Posted 19 April 2019 - 01:33 PM #7

Inside the micro store.. I'm trying to check it in tpl using smarty like so {if vendor url is vendor store} //do something.. {/if}

 

I would use the following solution

<div class="{if $runtime.controller == 'companies' && $runtime.mode == 'products'}show-class{else}hide-class{/if}"></div>

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 55 posts

Posted 19 April 2019 - 03:24 PM #8

Both worked great, Thanks..! Is there a way to check the product search inside a micro store?



 
  • soft-solid
  • Junior Member
  • Members
  • Join Date: 19-Apr 10
  • 667 posts

Posted 19 April 2019 - 08:55 PM #9

Hello

 

The standard search engine on this site only search for the vendor's products.

 

Best regards

Robert.


Team of SoftSolid
cs-cart.pl

 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 55 posts

Posted 20 April 2019 - 02:38 AM #10

Hello

 

The standard search engine on this site only search for the vendor's products.

 

Best regards

Robert.

 

Yes i understand, i just want to hide a class if search occurred inside the vendor's micro store



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19161 posts

Posted 22 April 2019 - 05:40 AM #11

In this case use the following condition

{if $runtime.controller == 'companies' && $runtime.mode == 'products' && $smarty.request.search_performed}
    ....
{/if}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 55 posts

Posted 28 April 2019 - 06:59 PM #12

 

In this case use the following condition

{if $runtime.controller == 'companies' && $runtime.mode == 'products' && $smarty.request.search_performed}
    ....
{/if}

100% thanks! 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19161 posts

Posted 29 April 2019 - 06:35 AM #13

You are welcome! :)


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.