Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DONT MIND THIS 2 JAVASCRIPT - They are for product seo and category seo URLs
- <script type="text/javascript">// <![CDATA[
- $(document).ready(function(){
- var keyword = $("input[name=keyword]").val();
- $("input[name*='product_description[2][name]']").keyup(function(){
- var text = $(this).val();
- text = text.toLowerCase();
- text = text.replace(/[^a-zA-Z0-9]+/g,'-');
- $("input[name=keyword]").val(text);
- });})
- // ]]></script>
- <script type="text/javascript">// <![CDATA[
- $(document).ready(function(){
- var keyword = $("input[name=keyword]").val();
- $("input[name*='category_description[2][name]']").keyup(function(){
- var text = $(this).val();
- text = text.toLowerCase();
- text = text.replace(/[^a-zA-Z0-9]+/g,'-');
- $("input[name=keyword]").val(text);
- });})
- // ]]></script>
- THESE ARE THE 4 JAVASCRIPT TO TAKE VALUES FROM FIELD AND ADD/SUBTRACT TAXES from my custom fields to original fields and vice versa:
- <script type="text/javascript">// <![CDATA[
- $(document).ready(function(){
- var price = $("input[name=price]").val();
- $("input[name*='IVA']").keyup(function(){
- var text = $(this).val();
- text = Math.round(((text*100)/121)*100)/100;
- $("input[name=price]").val(text);
- });})
- // ]]></script>
- <script type="text/javascript">// <![CDATA[
- $(document).ready(function(){
- var IVA = $("input[name=IVA]").val();
- $("input[name*='price']").keyup(function(){
- var text = $(this).val();
- text = Math.round(((text*121)/100)*100)/100;
- $("input[name=IVA]").val(text);
- });})
- // ]]></script>
- CONIVA AND SENZAIVA ARE 2 CUSTOM FIELD PLACED IN THE SAME PAGE OF PRODUCT FORM.
- <script type="text/javascript">// <![CDATA[
- $(document).ready(function(){
- var SENZAIVA = $("input[name=SENZAIVA]").val();
- $("input[name*='CONIVA']").keyup(function(){
- var text = $(this).val();
- text = Math.round(((text*100)/121)*100)/100;
- $("input[name=SENZAIVA]").val(text);
- });})
- // ]]></script>
- <script type="text/javascript">// <![CDATA[
- $(document).ready(function(){
- var CONIVA = $("input[name=CONIVA]").val();
- $("input[name*='SENZAIVA']").keyup(function(){
- var text = $(this).val();
- text = Math.round(((text*121)/100)*100)/100;
- $("input[name=CONIVA]").val(text);
- });})
- // ]]></script>
- BASICALLY I've 4 field: 1 opencart original (price) and 3 custom inserted in product form (IVA, CONIVA, SENZAIVA)
- all 4 are in the same page (product form)
- IVA value edit price value -- price value edit iva value
- coniva value edit senzaiva value -- senzaiva value edit coniva value
- but coniva and senzaiva edit also the price, and i don't want this.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement