Remove reference, meta, ... and have name for them all

In this board, we will periodically list various tips and tricks we find that may help in your use of PrestaShop. This will also include tips on the use of Agile modules. If you have a great tip, fix, or workaround for a PrestaShop feature, feel free to post it here...

Remove reference, meta, ... and have name for them all

Postby webmaster_15807 » Sat Feb 17, 2018 10:56 pm

I'm working on a little mod to remove the reference, meta, .... and have the name used for them. This reduces the amount of information sellers have to enter.

These are the 2 files that need to be modified:
~modules/agilemultipleseller/views/templates/front/products/informations.tpl
In this file put {block name="hide_mod" hide}... {/block} around the fields reference, meta, ....

~modules/agilemultipleseller/views/templates/front/products/input_text_lang.tpl
In this file before:
Code: Select all
{foreach from=$languages item=language}

add:
Code: Select all
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"> </script>


and after:
Code: Select all
            {if isset($maxchar)}
         </div>
         {/if}


add:
Code: Select all
         <script type="text/javascript">   
$(document).ready(function(){            

$( "select" ).change( insertVal );
insertVal();
});

function insertVal() {
  var name = $( '#{$input_name}_{$language.id_lang}' ).val();
  $("#reference").val(name);
  $("#meta_keywords_1").val(name);
  $("#meta_description_1").val(name);
  $("#meta_title_1").val(name);
}
</script>


I'm still working on it but thought others might me interested.
webmaster_15807
 
Posts: 67
Joined: Sat Jan 13, 2018 12:40 am

Return to Tips and Tricks for PrestaShop and Agile Modules

Who is online

Users browsing this forum: No registered users and 2 guests