Web Analytics Made Easy -
StatCounter How can i set default value to a form, in Prestashop platform admin? - CodingForum

Announcement

Collapse
No announcement yet.

How can i set default value to a form, in Prestashop platform admin?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can i set default value to a form, in Prestashop platform admin?

    Hello,

    I would like to set an automatic default value to all products, in "Displayed text when in-stock" form, in quantities produtcs tab. Can someone help?

    This is what i had discovered so far:

    In Prestashop Admin the form is here:
    Admin->Catalog->Products->Quantities->Displayed text when in-stock

    Here is how it looks in admin:
    Click image for larger version

Name:	Selection_005.png
Views:	1
Size:	43.8 KB
ID:	2283634

    On the server the file that must be edited is:
    /public_html/admin/themes/default/template/controllers/products/quantities.tpl

    Here is how it looks:
    Click image for larger version

Name:	Selection_006.jpg
Views:	1
Size:	39.7 KB
ID:	2283635

    On quantities.tpl file i need to edit line 248: "input_value=$product->available_now"


    {if $ps_stock_management}
    <div class="form-group">
    <div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}</span></div>
    <label class="control-label col-lg-2" for="available_now_{$default_language}">
    <span class="label-tooltip" data-toggle="tooltip" title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
    {l s='Displayed text when in-stock'}
    </span>
    </label>
    <div class="col-lg-9">
    {include file="controllers/products/input_text_lang.tpl"
    languages=$languages
    input_value=$product->available_now
    input_name='available_now'}
    </div>
    </div>

    ====================================================================

    My question is:
    How can i edit this line: input_value=$product->available_now
    so the automatic default value "In stock" is set to all products in shop?

    PS:
    I have replaced input_value=$product->available_now with input_value="In stock" but in admin shop is displayed only "s" value.

    Thanks!
Working...
X