Jump to content

Recommended Posts

Yes,

in the class Product.php set the property $active to false by default (on line 165)

	/** @var boolean Product statuts */
	public $active = false;

and edit the template file admin/theme/default/template/controllers/products/information.tpl.

Replace the bloc {* status informations *} (line 192) by this:

	{* status informations *}
	<div class="form-group">		
		<label class="control-label col-lg-3">
			{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
			{l s='Enabled'}
		</label>
		<div class="col-lg-9">
			<span class="switch prestashop-switch fixed-width-lg">
				<input onclick="toggleDraftWarning(false);showOptions(true);showRedirectProductOptions(false);" type="radio" name="active" id="active_on" value="1" {if $product->active}checked="checked" {/if} />
				<label for="active_on" class="radioCheck">
					{l s='Yes'}
				</label>
				<input onclick="toggleDraftWarning(true);showOptions(false);showRedirectProductOptions(true);"  type="radio" name="active" id="active_off" value="0" {if !$product->active}checked="checked"{/if} />
				<label for="active_off" class="radioCheck">
					{l s='No'}
				</label>
				<a class="slide-button btn"></a>
			</span>
		</div>
	</div>
  • Like 1
Link to comment
Share on other sites

  • 6 months later...

What do you want ?

I would like know what change in code of tpl file  admin/theme/default/template/controllers/products/information.tpl. of prestashop 1.5 should be done, code for prestashop 1.6 look different form prestashop 1.5

 

I need new product added to set be disabled (red cross) automatically once added and should enabled (green tick) manually once ready to go live on site. as if now prestashop automatically enable new product added.

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

 

in 1.5 only change the product class:

/** @var boolean Product statuts */
	public $active = false;

I Just tired this it does not work. I still get green tick back office and product show up in front office.

Link to comment
Share on other sites

×
×
  • Create New...