Jump to content

From wich file $catalog_mode value is retrieved on page load.


kuipje
 Share

Recommended Posts

Hi there,

Does anyone know in which file the ($catalog_mode} value is retrieved on page load in version 1.4.
The reason is that i want to combine this value with customer group id, so that if the customergroup_id > 1 catalog_mode is false, and when customergroup_id < 2 catalog_mode should be true.

This is my first step towards a site where prices will be displayed after customer approval.


Sorry for my bad english,
Thanks

Share this post


Link to post
Share on other sites

Thx for the support!.

I found them in
Search "PS_CATALOG_MODE" (4 hits in 2 files)
\classes\Cart.php (2 hits)
Line 502: elseif (!$product->available_for_order OR Configuration::get('PS_CATALOG_MODE'))
Line 1329: if (Configuration::get('PS_CATALOG_MODE'))

\FrontController.php (2 hits)
Line 227: 'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE')
Line 227: 'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE')


i wrote the next code to enable and disable Catalog_mode in FrontController.php @ line 230.

$number_three = 1;

       if ($number_three == 1 ) {    $smarty->assign(array(
       'PS_CATALOG_MODE' => 1 //(bool)Configuration::get('PS_CATALOG_MODE')
       )); }
       else
        {    $smarty->assign(array(
       'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE')
       )); }


Now i want Number three to be "customer group== 1"

All help is welcom!.

Kuipje

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More