VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: thefbi on March 15, 2021, 09:58:03 am

Title: Affiliate component and Virtuemart
Post by: thefbi on March 15, 2021, 09:58:03 am
Hello,

i am searching for an affiliate component for Virtuemart. I find this post on your site : https://virtuemart.net/news/list-all-news/320?task=view

Now, the jafilia project is not about affiliation... I suggest you delete this article.

And if you have an idea if exist an affiliate program for VM ?

Regards
Title: Re: Lint to sex advertising in your virtuemart.net site
Post by: StefanSTS on March 15, 2021, 11:30:38 am
Hi thefbi,

I do not really know an extension for affiliate functions, but if you explain how the result should look like, I am sure there is a solution to that.

In some cases it might help to just use a small content plugin to exchange some text with an affiliate code.

Regards
Stefan

Title: Re: Lint to sex advertising in your virtuemart.net site
Post by: Milbo on March 15, 2021, 11:46:26 am
Thank you, it was an archived article from 2008, is now trashed. But in my case it did not link to sex, but to a carseller. ?
Title: Re: Lint to sex advertising in your virtuemart.net site
Post by: thefbi on March 15, 2021, 12:59:32 pm
Thank you, it was an archived article from 2008, is now trashed. But in my case it did not link to sex, but to a carseller. ?

You are welcome. Glad if it can help :)
Title: Re: Lint to sex advertising in your virtuemart.net site
Post by: thefbi on March 15, 2021, 13:26:23 pm
Hi thefbi,

I do not really know an extension for affiliate functions, but if you explain how the result should look like, I am sure there is a solution to that.

In some cases it might help to just use a small content plugin to exchange some text with an affiliate code.

Regards
Stefan

Hi, thank you.

Actually, i use idev affiliate for anothe website (with Membership pro). So i can use this system with Virtuemart.
Basically, idev can work with VM, but too simply. I mean, i just can make some affiliate percentage, depending on the amount they sell. This is not enough.

That was the same with the config for Membership pro. BUT, i was able to configure the commissions manually.
For that, I could use a function in membership pro, which is a php script called after the validation of a member registration.

So for each plan subscription, I made a code that will fetch the info of the plan, then put this info together and send it to idev as a POST request (well, I hope that's it, I don't have too much knowledge in programming, I manage as I can).

But in VM, i cant put php code for that ? Or is there a plugin to do that ?

The exemple of code i have for Membership pro :

Code 1, is subscription stored script (This is the PHP code will be run after subscription record stored into database (before payment stored) :
Code: [Select]
// insert order id and ip address
$db = JFactory::getDbo();
$query = $db->getQuery(true);

$columns = array('order_id', 'ip_address');
$values = array(intval($row->id), $db->quote($_SERVER['REMOTE_ADDR']));

$query->insert($db->quoteName('#__thename-of-my-table'))->columns($db->quoteName($columns))->values(implode(',', $values));

$db->setQuery($query);
$db->execute();

And code 2, subscription active script (This is the PHP code will be run after subscription status is active(for example, after payment compelted or admin approve subscription record from backend)).
Code: [Select]
       
        /* Définit le facteur pour la commission */
        $pourcentage_commission = 0.35;
        /* fin pourcentage */       
       
        /* définit la commission affichée sur la confirmation dans idev  Ajouté par fred */
$commission = '35%';
/* fin */
         
       
        $db = JFactory::getDbo();
$query = $db->getQuery(true);

/* get ip address */
$query->select('ip_address')
->from('#__name-of-my-idev-table')
->where('order_id = ' . intval($row->id));
$db->setQuery($query);
$ip_address = $db->loadResult();

/* get product data */
$query->clear();
$query->select('title')
->from('#__name-of-my-membership-pro-table')
->where('id = ' . intval($row->plan_id));
$db->setQuery($query);
$products_purchased = $db->loadResult();
/* get product data */

/* get product currency Ajouté par Fred pour récupérer la devise */
$query->clear();
$query->select('currency')
->from('#__name-of-my-membership-pro-table')
->where('id = ' . intval($row->plan_id));
$db->setQuery($query);
$products_currency = $db->loadResult();
/* get product currency Fin ajouté par Fred */

/* get coupon code */
$coupon_code = '';
if ($data->coupon_id) {
$query->clear();
$query->select('code')
->from('#__name-of-my-membership-pro-table')
->where('id = ' . intval($row->coupon_id));
$db->setQuery($query);
$coupon_code = $db->loadResult();
}
/* get coupon code */

/* get subtotal */
$sub_total = $row->amount - $row->discount_amount;
/* get subtotal */


/* get comm amount Ajouté par fred pour calculer pourcentage commission */
$comm_amount = $sub_total * $pourcentage_commission;
/* fin get comm amount */





/* generate tracking url */
$tracking_url = 'https://url-of-my-idev-installation/sale.php';
$tracking_fields = 'profile=153&ip_address='.$ip_address.'&idev_saleamt='.$sub_total.'&idev_currency='.$products_currency.'&idev_ordernum='.$row->id.'&idev_option_1='.$products_purchased.'&products_purchased='.$products_purchased.'&coupon_code='.$coupon_code.'&idev_commission='.$comm_amount.'&idev_option_2='.$commission;
/* generate tracking url */

/* submit url */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $tracking_url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $tracking_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$return = curl_exec($ch);
curl_close($ch);
/* submit url */



Title: Re: Affiliate component and Virtuemart
Post by: pinochico on March 15, 2021, 13:43:14 pm
Hello,

exist - VMAffiliate
We use on 8 shops for one client and continue with develop with app VM Affiliate from Romania for VM3 and J3 (this project officiall was stopped on 2019, but we continue with develop)
You can see example on cannadorra.com

Affiliate from iDev we are tried too, but is not comfortable for bussines.
Title: Re: Affiliate component and Virtuemart
Post by: StefanSTS on March 15, 2021, 13:45:15 pm
There are a lot of triggers these days in VirtueMart that could be used to get inbetween these processes.

Try to search for "plgVmOn" to find "plgVmOnSomething" in the code. E. g. plgVmOnPaymentResponseReceived

You could write your own plugin to make use of these triggers. There might be some programmers here who have done similar.

Title: Re: Affiliate component and Virtuemart
Post by: thefbi on March 15, 2021, 15:21:56 pm
Hello,

exist - VMAffiliate
We use on 8 shops for one client and continue with develop with app VM Affiliate from Romania for VM3 and J3 (this project officiall was stopped on 2019, but we continue with develop)
You can see example on cannadorra.com

Affiliate from iDev we are tried too, but is not comfortable for bussines.

Hi, yes i have seen this component, and seen it was stopped. So how can i get it ? And who will perform update etc ?
Title: Re: Affiliate component and Virtuemart
Post by: thefbi on March 15, 2021, 15:22:26 pm
There are a lot of triggers these days in VirtueMart that could be used to get inbetween these processes.

Try to search for "plgVmOn" to find "plgVmOnSomething" in the code. E. g. plgVmOnPaymentResponseReceived

You could write your own plugin to make use of these triggers. There might be some programmers here who have done similar.



OK thanks, i will try to search like this.
Title: Re: Affiliate component and Virtuemart
Post by: pinochico on March 17, 2021, 22:15:28 pm
Quote
Hi, yes i have seen this component, and seen it was stopped. So how can i get it ? And who will perform update etc ?

https://www.minijoomla.org/extensions/virtuemart-extensions/vma-affiliate
Title: Re: Affiliate component and Virtuemart
Post by: thefbi on March 18, 2021, 10:00:04 am
Great, thank you, i will order it.
Title: Re: Affiliate component and Virtuemart
Post by: thefbi on June 07, 2021, 08:05:29 am
Hello,
just a come back in this post, to share my bad experience with pinochico.

I bought the component vmaffiliate on the site of minijoomla.org as suggested by pinochico.

First of all, this component was not compatible with an updated Joomla system. I had to wait for its developers to start programming the component to make it compatible. OK, I want to understand that sometimes things don't go as planned, and I want to be patient. I was asked to wait 10 days.

It has been more than 2 months now, and the component still doesn't work. After several reminders from me to be able to use this component, and after several messages telling me that it still doesn't work, I have no answer from pinochico, to whom I asked for a refund of my purchase (about 150 Euros).

As I said before, I can understand that sometimes things don't work out the way you want.

What I can't understand is the lack of professionalism of some people who sell products that are not functional, who don't give solutions in a reasonable time, and who finally don't even answer anymore. As a result, I got ripped off 150 Euros for a component I bought that doesn't work.

I am aware that this forum is not made for that, but I hope that by sharing this bad experience, other people will not make the same mistake as me by seeing this post.

As for me, I will continue to look for something else for my affiliate idea.

Regards