Jump to content

Catalog mode


fbascuiz

Recommended Posts

Hello guys

 

Im starting using prestashop and i want change some details, i need find the files and the codes for make this changes:

 

how can show the currency selector in catalog mode?

how can hide or edit the "add to cart" button in catalog mode?

 

Regards

Link to comment
Share on other sites

modify module blockcurrencies/blockcurrencies.php change:

FROM:

public function hookHeader($params)
{
 if (Configuration::get('PS_CATALOG_MODE'))
  return ;
 Tools::addCSS(($this->_path).'blockcurrencies.css', 'all');
}

 

TO:

 

public function hookHeader($params)
{
//  if (Configuration::get('PS_CATALOG_MODE'))
//   return ;
 Tools::addCSS(($this->_path).'blockcurrencies.css', 'all');
}

modify modules/ blockcart/blockcart.php

From:

 

public function hookRightColumn($params)
{
 if (Configuration::get('PS_CATALOG_MODE'))
  return;
 global $smarty;
 $smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false);
 $this->smartyAssigns($smarty, $params);
 return $this->display(__FILE__, 'blockcart.tpl');
}

 

TO:

 

public function hookRightColumn($params)
{
//  if (Configuration::get('PS_CATALOG_MODE'))
//   return;
 global $smarty;
 $smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false);
 $this->smartyAssigns($smarty, $params);
 return $this->display(__FILE__, 'blockcart.tpl');
}

  • Like 1
Link to comment
Share on other sites

modify module blockcurrencies/blockcurrencies.php change:

FROM:

public function hookHeader($params)
{
 if (Configuration::get('PS_CATALOG_MODE'))
  return ;
 Tools::addCSS(($this->_path).'blockcurrencies.css', 'all');
}

 

TO:

 

public function hookHeader($params)
{
//  if (Configuration::get('PS_CATALOG_MODE'))
//   return ;
 Tools::addCSS(($this->_path).'blockcurrencies.css', 'all');
}

modify modules/ blockcart/blockcart.php

From:

 

public function hookRightColumn($params)
{
 if (Configuration::get('PS_CATALOG_MODE'))
  return;
 global $smarty;
 $smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false);
 $this->smartyAssigns($smarty, $params);
 return $this->display(__FILE__, 'blockcart.tpl');
}

 

TO:

 

public function hookRightColumn($params)
{
//  if (Configuration::get('PS_CATALOG_MODE'))
//   return;
 global $smarty;
 $smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false);
 $this->smartyAssigns($smarty, $params);
 return $this->display(__FILE__, 'blockcart.tpl');
}

 

 

Gracias Patron, funciono perfecto.

Te escribo en español ya que vi que eres de Colombia. Tengo otra duda, es un detalle pero quiero mostrar la categoría principal sobre el precio. Estoy editando el archivo product.tpl pero no sé cual es el codigo para que aparezca la categoría por defecto que se selecciona al editar las asociaciones del producto, espero puedas ayudarme,

 

saludos desde Chile

 

I write in Spanish bacause I saw that you are from Colombia. I have another question, is a detail but I want to show the main category above the price. I'm editing the "product.tpl" file but I dont know which is the code to display the default category that is selected in product associations, I hope you can help me,

 

Regards from Chile

Link to comment
Share on other sites

jajajaja...I live in Colombia but just a yank with not very good Spanish. Lucky my [spam-filter] speaks 5 languages else I might starve. You all have some pretty good wine down there in Chile.

 

place this in your .tpl to see what variables are being passed to your .tpl

 

{debug}

Edited by elpatron (see edit history)
  • Like 1
Link to comment
Share on other sites

edit any .tpl file. Place the degug code in it...then navigate to that .tpl and you will get a pop up screen with all the variables available to that .tpf file, i.e. product.tpl etc. Make sure to set smarty cache to no in your back office performance tag to see you new debut tag.

  • Like 1
Link to comment
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
×
×
  • Create New...