Jump to content

Get current store id in admin panel


Recommended Posts

  • 8 months later...
  • 3 months later...
  • 1 year later...
  • 6 months later...


public function __construct()

{

$this->bootstrap = true;

$this->table = 'specific_price_rule';

$this->className = 'SpecificPriceRule';

$this->lang = false;

 

$this->list_reduction_type = array(

'percentage' => $this->l('Percentage'),

'amount' => $this->l('Amount')

);

 

$this->addRowAction('edit');

$this->addRowAction('delete');

 

$this->context = Context::getContext();

 

$this->_select = 's.name shop_name,s.id_shop id_shop, cu.name currency_name, cl.name country_name, gl.name group_name';

$this->_join = 'LEFT JOIN '._DB_PREFIX_.'shop s ON (s.id_shop = a.id_shop)

LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency)

LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = a.id_country AND cl.id_lang='.(int)$this->context->language->id.')

LEFT JOIN '._DB_PREFIX_.'group_lang gl ON (gl.id_group = a.id_group AND gl.id_lang='.(int)$this->context->language->id.')';

$this->_where = 'AND a.id_shop IN ("'.(int)Context::getContext().'") ';

post-808397-0-85959700-1437733823_thumb.jpg

Edited by JoelWebsites (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...