[Vtigercrm-developers] Add multiple products to campaign

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Vtigercrm-developers] Add multiple products to campaign

Stuart Maynard-Keene
Hi list,

Is there a way to add multiple products to a campaign?

Thanks
Stu

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Add multiple products to campaign

its4you
I suppose you need create N:N relation. You need somethink like this ?
First backup your vtiger installation. Then create a file at root of
vtiger installation and run it via browser.

<?php

include_once 'vtlib/Vtiger/Module.php';

$focus=Vtiger_Module::getInstance('Campaigns');
$focus->setRelatedList(Vtiger_Module::getInstance('Products'), 'ADD
Product',Array('ADD','SELECT'));


You will need deactivate standard 1:N relation cretaed in vtiger because
Reports, Filters will don't work correctly.


Matus

Dňa 2. 6. 2016 o 10:44 Stuart Maynard-Keene napísal(a):

> Hi list,
>
> Is there a way to add multiple products to a campaign?
>
> Thanks
> Stu
>
> _______________________________________________
> http://www.vtiger.com/
>


_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Add multiple products to campaign

Sutharsan Jeganathan
Hi

That is a good solution, but creates the product as a related list to campaign which will not provide the capability of filtering (and reporting) Campaigns by products.

Do you need to add larger set of products under Campaign? if not you need multiple product reference fields under the campaign create view (Or may be a Add Product field button)

Thanks
Sutharsan Jeganathan

On Thu, Jun 2, 2016 at 3:30 PM, IT-Solutions4You <[hidden email]> wrote:
I suppose you need create N:N relation. You need somethink like this ?
First backup your vtiger installation. Then create a file at root of vtiger installation and run it via browser.

<?php

include_once 'vtlib/Vtiger/Module.php';

$focus=Vtiger_Module::getInstance('Campaigns');
$focus->setRelatedList(Vtiger_Module::getInstance('Products'), 'ADD Product',Array('ADD','SELECT'));


You will need deactivate standard 1:N relation cretaed in vtiger because Reports, Filters will don't work correctly.


Matus

Dňa 2. 6. 2016 o 10:44 Stuart Maynard-Keene napísal(a):
Hi list,

Is there a way to add multiple products to a campaign?

Thanks
Stu

_______________________________________________
http://www.vtiger.com/



_______________________________________________
http://www.vtiger.com/


_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Add multiple products to campaign

Stuart Maynard-Keene
Hi,

Sorry for the late reply to this, just picking it back up.

I’ve looked at the solution by Matus but don’t seem to be able to achieve it.

I don’t know where to start with what Sutharsan suggests.

Can anyone give me more information please?

Stu

On 06/06/2016, 18:11, "[hidden email] on behalf of Sutharsan Jeganathan" <[hidden email] on behalf of [hidden email]> wrote:

    Hi
   
   
    That is a good solution, but creates the product as a related list to campaign which will not provide the capability of filtering (and reporting) Campaigns by products.
   
   
    Do you need to add larger set of products under Campaign? if not you need multiple product reference fields under the campaign create view (Or may be a Add Product field button)
   
   
    Thanks
   
    Sutharsan Jeganathan
   
   
    On Thu, Jun 2, 2016 at 3:30 PM, IT-Solutions4You
    <[hidden email]> wrote:
   
    I suppose you need create N:N relation. You need somethink like this ?
    First backup your vtiger installation. Then create a file at root of vtiger installation and run it via browser.
   
    <?php
   
    include_once 'vtlib/Vtiger/Module.php';
   
    $focus=Vtiger_Module::getInstance('Campaigns');
    $focus->setRelatedList(Vtiger_Module::getInstance('Products'), 'ADD Product',Array('ADD','SELECT'));
   
   
    You will need deactivate standard 1:N relation cretaed in vtiger because Reports, Filters will don't work correctly.
   
   
    Matus
   
    Dňa 2. 6. 2016 o 10:44 Stuart Maynard-Keene napísal(a):
    Hi list,
   
    Is there a way to add multiple products to a campaign?
   
    Thanks
    Stu
   
    _______________________________________________
    http://www.vtiger.com/
   
   
   
   
   
    _______________________________________________
    http://www.vtiger.com/
   
   
   
   
   


_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Add multiple products to campaign

Sutharsan Jeganathan
Hi

Simply you may add a multi select pick list and add products name or serial number there: )

We automate it by adding a custom workflow under product module which updates this campaign pick list for each add, update or delete.


Thanks 
SUTHARSAN JEGANATHAN 

On 29 Jan 2017 02:03, "Stuart Maynard-Keene" <[hidden email]> wrote:
Hi,

Sorry for the late reply to this, just picking it back up.

I’ve looked at the solution by Matus but don’t seem to be able to achieve it.

I don’t know where to start with what Sutharsan suggests.

Can anyone give me more information please?

Stu

On 06/06/2016, 18:11, "[hidden email] on behalf of Sutharsan Jeganathan" <[hidden email] on behalf of [hidden email]> wrote:

    Hi


    That is a good solution, but creates the product as a related list to campaign which will not provide the capability of filtering (and reporting) Campaigns by products.


    Do you need to add larger set of products under Campaign? if not you need multiple product reference fields under the campaign create view (Or may be a Add Product field button)


    Thanks

    Sutharsan Jeganathan


    On Thu, Jun 2, 2016 at 3:30 PM, IT-Solutions4You
    <[hidden email]> wrote:

    I suppose you need create N:N relation. You need somethink like this ?
    First backup your vtiger installation. Then create a file at root of vtiger installation and run it via browser.

    <?php

    include_once 'vtlib/Vtiger/Module.php';

    $focus=Vtiger_Module::getInstance('Campaigns');
    $focus->setRelatedList(Vtiger_Module::getInstance('Products'), 'ADD Product',Array('ADD','SELECT'));


    You will need deactivate standard 1:N relation cretaed in vtiger because Reports, Filters will don't work correctly.


    Matus

    Dňa 2. 6. 2016 o 10:44 Stuart Maynard-Keene napísal(a):
    Hi list,

    Is there a way to add multiple products to a campaign?

    Thanks
    Stu

    _______________________________________________
    http://www.vtiger.com/





    _______________________________________________
    http://www.vtiger.com/







_______________________________________________
http://www.vtiger.com/

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Add multiple products to campaign

Stuart Maynard-Keene
Thanks for the reply Sutharsan. Would it be possible to create a screencast for me to see where I’m going wrong.

Thanks in advance.

Stu

On 29/01/2017, 02:35, "[hidden email] on behalf of Sutharsan Jeganathan" <[hidden email] on behalf of [hidden email]> wrote:

    Hi
   
   
    Simply you may add a multi select pick list and add products name or serial number there: )
   
   
    We automate it by adding a custom workflow under product module which updates this campaign pick list for each add, update or delete.
   
   
   
   
    Thanks
    SUTHARSAN JEGANATHAN
   
   
    On 29 Jan 2017 02:03, "Stuart Maynard-Keene" <[hidden email]> wrote:
   
    Hi,
   
    Sorry for the late reply to this, just picking it back up.
   
    I’ve looked at the solution by Matus but don’t seem to be able to achieve it.
   
    I don’t know where to start with what Sutharsan suggests.
   
    Can anyone give me more information please?
   
    Stu
   
    On 06/06/2016, 18:11, "[hidden email] on behalf of Sutharsan Jeganathan" <[hidden email]
     on behalf of [hidden email]> wrote:
   
        Hi
   
   
        That is a good solution, but creates the product as a related list to campaign which will not provide the capability of filtering (and reporting) Campaigns by products.
   
   
        Do you need to add larger set of products under Campaign? if not you need multiple product reference fields under the campaign create view (Or may be a Add Product field button)
   
   
        Thanks
   
        Sutharsan Jeganathan
   
   
        On Thu, Jun 2, 2016 at 3:30 PM, IT-Solutions4You
        <[hidden email]> wrote:
   
        I suppose you need create N:N relation. You need somethink like this ?
        First backup your vtiger installation. Then create a file at root of vtiger installation and run it via browser.
   
        <?php
   
        include_once 'vtlib/Vtiger/Module.php';
   
        $focus=Vtiger_Module::getInstance('Campaigns');
        $focus->setRelatedList(Vtiger_Module::getInstance('Products'), 'ADD Product',Array('ADD','SELECT'));
   
   
        You will need deactivate standard 1:N relation cretaed in vtiger because Reports, Filters will don't work correctly.
   
   
        Matus
   
        Dňa 2. 6. 2016 o 10:44 Stuart Maynard-Keene napísal(a):
        Hi list,
   
        Is there a way to add multiple products to a campaign?
   
        Thanks
        Stu
   
        _______________________________________________
        http://www.vtiger.com/
   
   
   
   
   
        _______________________________________________
        http://www.vtiger.com/
   
   
   
   
   
   
   
    _______________________________________________
    http://www.vtiger.com/
   
   
   
   


_______________________________________________
http://www.vtiger.com/