<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged products</title>
<link>https://overflow.efficy.io/?qa=tag/products</link>
<description>Powered by Question2Answer</description>
<item>
<title>Updating Linked Product lines in Oppo Edit &gt; OK in IE, not in Other browsers</title>
<link>https://overflow.efficy.io/?qa=2937/updating-linked-product-lines-oppo-edit-not-other-browsers</link>
<description>&lt;p&gt;I keep getting problems with the following.&lt;/p&gt;

&lt;p&gt;When a field in edit of an oppo is changed, I want to update linked products directly.&lt;/p&gt;

&lt;p&gt;The following 2 pieces each work on IE, but not in Firefox or Chrome, there the fields in the product grid aren't up to date...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function updateSelectedProducts(valueInput,type){
            var scriptFile = &quot;OppoScripts&quot;;
            var scriptFunc = &quot;updateProducts&quot;;
            var extraParam = format(&quot;&amp;amp;editHandle={editHandle}&amp;amp;value=$0&amp;amp;type=$1&quot;,valueInput,type);
            CebPerform(&quot;CEB_STATE&quot;);
            $.ajax({
                url: format(&quot;dialog?_macrofile=MacroAjax&amp;amp;_macro=RunScript&amp;amp;File=$0&amp;amp;Func=$1&quot;, scriptFile, scriptFunc),
                data: extraParam,
                async: false
            }).done(function (result) {
                console.log('updateSelectedProducts A');
            });
        }

        function updateSelectedProductsOLD(valueInput,type){
            var URL = format(&quot;dialog?_macrofile=MacroAjax&amp;amp;_macro=RunScript&amp;amp;file=OppoScripts;libjson&amp;amp;func=updateProducts&amp;amp;editHandle={editHandle}&amp;amp;value=$0&amp;amp;type=$1&quot;,valueInput,type);
            CebPerform(&quot;CEB_STATE&quot;);
            $.ajax({
                url: URL,
                type: &quot;GET&quot;,
                success: function (html, textStatus, jqXHR) {
                    if (IsNotEfficyErrorHtml(html, function(errorMsg) {alert(errorMsg)})) {
                        console.log('updateSelectedProducts B');
                    }
                }
            });
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I Really need this to work on all browsers. Or is there a better way to do this ?&lt;/p&gt;

&lt;p&gt;My Serverscript is the following : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function updateProducts(){
var editHandle = StrToIntDef(Request.Argument(&quot;editHandle&quot;), 0);
var Value = Request.Argument(&quot;value&quot;);
var type = Request.Argument(&quot;type&quot;);

var ProdDataSet = Database.GetDetailDataSet(editHandle, ntProd);
ProdDataSet.First
var updated = 0;
while (!ProdDataSet.Eof) {
    ProdDataSet.Edit
    var K_Product = ProdDataSet.FieldByName('K_PRODUCT').AsFloat
    var K_Relation = ProdDataSet.FieldByName('K_RELATION').AsInteger

    var Price = ProdDataSet.FieldByName('PRICE').AsFloat
    var Price_USD = ProdDataSet.FieldByName('F_PRICE_USD').AsFloat

    var F_TYPE = ProdDataSet.FieldByName('F_TYPE').AsInteger
    if (F_TYPE == type){
        updated++;
        ProdDataSet.FieldByName('QUANTITY').AsFloat =  parseFloat(Value)   //Value
        ProdDataSet.FieldByName('F_TOTAL_USD').AsFloat =  parseFloat(Value) * Price_USD;
        ProdDataSet.FieldByName('TOTAL').AsFloat =  parseFloat(Value) * Price;
    }
    ProdDataSet.Next
}   
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;}&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2937/updating-linked-product-lines-oppo-edit-not-other-browsers</guid>
<pubDate>Thu, 15 Feb 2018 14:44:50 +0000</pubDate>
</item>
<item>
<title>How to automatically add a serie of products linked to a document?</title>
<link>https://overflow.efficy.io/?qa=2741/how-to-automatically-add-serie-of-products-linked-document</link>
<description>&lt;p&gt;See screenshot below. I would like to use a button which triggers a serie (&amp;gt;1) of products automatically linked to the document. The serie of products to be loaded depends on the linked project and is based on the type of project. This last part is less important, my main question is how to realize the first part: how to add multiple products to the document.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=5491577173252996204&quot; alt=&quot;How to automatically add products here&quot;&gt;&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2741/how-to-automatically-add-serie-of-products-linked-document</guid>
<pubDate>Fri, 03 Nov 2017 12:53:38 +0000</pubDate>
</item>
<item>
<title>Best way to create &quot;duplicate product button&quot; on product consult view</title>
<link>https://overflow.efficy.io/?qa=1994/best-create-duplicate-product-button-product-consult-view</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I want to do a &quot;duplicate product button&quot; on product consult screen (maybe on edit creen later)&lt;/p&gt;

&lt;p&gt;I want to know the best way to do it ?&lt;/p&gt;

&lt;p&gt;Thansk a lot&lt;/p&gt;

&lt;p&gt;regards&lt;/p&gt;

&lt;p&gt;Michael&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1994/best-create-duplicate-product-button-product-consult-view</guid>
<pubDate>Thu, 03 Nov 2016 15:32:01 +0000</pubDate>
</item>
<item>
<title>Products are not listed when added on 6100</title>
<link>https://overflow.efficy.io/?qa=1767/products-are-not-listed-when-added-on-6100</link>
<description>&lt;p&gt;This has been fixed in Efficy 10.&lt;/p&gt;

&lt;p&gt;The patch :&lt;/p&gt;

&lt;p&gt;In Efficy R6100, on scripts/Edit.js, line 78 :&lt;/p&gt;

&lt;p&gt;Replace :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;                           var wnd = top.OpenNewWindow(&quot;Search&quot;, &quot;&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;by : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;                           var wnd = top.OpenNewWindow('Search', '', null, null, '', true);
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1767/products-are-not-listed-when-added-on-6100</guid>
<pubDate>Fri, 15 Jul 2016 13:21:04 +0000</pubDate>
</item>
</channel>
</rss>