kuschang
Forum Replies Created
-
yes ok
Great, can’t wait for it ??
@iovamihai update.
Your last code just fix everything. The cookie is working on the right track now.
Thank you so much. I really appreciate your help. Considering I am just a free user, but you never tired to show the support. Hopefully as soon as the business is launch and going ok, I will go for the premium.
Thanks again.
Ok that is fine, I will try the code, I have also set the robots.txt so only a few allowed. One problem is and it’s critical also, even user go to the affiliate link first time, then click other link inside the homepage and unfortunately, the link inside are all base on original domain address without affiliate slug id, and guess what…..all new affiliate order’s commission, visits and referrer goes to the parent affiliate. Is it something to do with the cookie first and last? So it seems like I rob all traffic and commissions ??
Thanks @iovamihai
- This reply was modified 1 year, 8 months ago by kuschang.
Hello @iovamihai
I like it when you said even so….. sounds good ?? It worked like a charm! Only one problem, all bots visits also registered, on many different pages that supposed to be hidden hehe. I think I have to disable the visits function above, so only commission data is fine.
Thanks a lot Mihai.
I have tested, it worked, but only for the affiliate count. So the affiliate count column that I made using your code few days ago inside admin affiliate area shows 1, but when I login to affiliate account on separate browser the commission tab shows nothing, the visits tab also shows nothing. And the admin area of Commission and Visits also nothing. How can I also enable these commission and visits tabs for that function?
Thanks @iovamihai
Yes I think this code should solve my problem. Means that every affiliate who registered from the main domain website which has no affiliate id slug would be set under “1234” affiliate, am I right?
I will try this code and let you know the result. Thanks @iovamihai
Ok never mind, thanks anyway Mihai
Okay, thanks a lot Mihai
Ok no problem. Thanks anyway.
Ok, @iovamihai
One more thing. How do I make the referred affiliates count column sortable like ascending and descending?
Regards,
RikiezYes, I have put all the template files into themes/child-theme/slicewp/affiliate-area.
I finally get the workaround of creating a new column inside affiliate-account-tab-commissions template and shows the referred affiliate name for each row.
<td><?php $order_id = $commission->get('reference'); $order = wc_get_order( $order_id ); $customer_name = $order->get_billing_first_name(); echo $customer_name; ?> </td>
Let me know what you think.
Thank you very much @iovamihai really appreciate all your help.
Rikiez
Hi @iovamihai
Actually I have added some codes from chatgpt created for me yesterday ?? in the affiliate dashboard tab template.
$args = array( 'number' => -1, 'fields' => 'user_id', 'parent_id' => $args['affiliate_id'] ); $referred_affiliates = slicewp_get_affiliates( $args ); and this: <div class="slicewp-card slicewp-card-affiliate-dashboard"> <div class="slicewp-card-inner"> <div class="slicewp-card-title"><?php echo __( 'Referrals', 'slicewp' ); ?></div> <div class="slicewp-kpi-value"><?php echo count($referred_affiliates); ?> org</div> </div> </div>
It worked, but yours are way better. So I’m gonna use your provided code.
I have also added the “converted” column in the affiliate visit tab template (from chatgpt) maybe not beautiful but it worked.
I added this: <th><?php echo __( 'Converted', 'slicewp' ); ?></th> and this: <td> <?php if ( empty( $visit->get('commission_id') ) ) : ?> <span class="slicewp-status-icon"><?php echo slicewp_get_svg( 'outline-x' ); ?> No</span> <?php else : ?> <span class="slicewp-status-icon slicewp-status-converted"><?php echo slicewp_get_svg( 'outline-check' ); ?> Yes</span> <?php endif; ?> </td>
Would it be a problem with the code in the future?
Anyway, thanks a lot for the help Mihai.
O yes, can I add this code to the dashboard of affiliate user account page so that user will know how many of affiliates he has already referred?
Thanks.
Yes it works again. You are awesome. Thanks @iovamihai
Okay, no problem. Already glad that finally the code above worked.
Thanks.