Affliate ID

  • Posts: 44
  • Thank you received: 0
12 years 11 months ago #36740

I would like the customers of my website to be able to manually enter the ID of the affiliate that led them to the website without the use of the url. eg: There would be a field in the shopping cart to allow the customer to enter the affiliate ID. also how can I make it such that the customer is unable to buy without a valid affiliate ID.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13414
  • MODERATOR
12 years 11 months ago #36820

Hi,

There is no such option. You would have to create some customization for that.
If you're interested for us to do it for you, you can request a quote via our contact form.

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 0
12 years 11 months ago #36823

I am a programmer myself and have no problem playing with the code but this is my first time to use joomla or hikashop. If you could point me in the right direction such s which files control what and I will go on from there. That would be very much appreciated

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13414
  • MODERATOR
12 years 11 months ago #36829

Then, you should create a page with a form asking for the affiliate id, with a joomla form extension or directly yourself, then redirect to some page of your website with the parameter &partner_id=ID
where the ID would be the id entered by the user.
Then he would be automatically affected to that partner.
For the restriction of the purchase, you could edit the file "step" of the view "checkout" via the menu Display>Views and add a check there by loading the information of the user from the hikashop_user table like that:
$user = hikashop_loadUser(true);

Last edit: 12 years 11 months ago by Jerome.

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 0
12 years 11 months ago #36896

Ok so how do I redirect to my form from the cart (Any step in the checkout process would be fine).

also what does the line "$user = hikashop_loadUser(true);" actually do.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13414
  • MODERATOR
12 years 11 months ago #36898

You should redirect to the URL yourwebsite.com/index.php?option=com_hik...l=checkout&task=step

That line of code loads the current user information that you can use to do your check on whether the user has entered his partner id or not.

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 0
12 years 11 months ago #36900

What I mean is the user just added a few items to cart then he clicks checkout. At this point I want him to be forwarded to my custom form where he fills out the affiliate ID of the partner who lead him to the site. ie. I want to add an additional step in the checkout process where the user enters the affiliate id.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13414
  • MODERATOR
12 years 11 months ago #36905

You should edit the file "step" of the view "checkout" via the menu Display>Views and add your redirect to your form there.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum