Jump to content
Sign in to follow this  
someone

Comission on subtotal not total

Recommended Posts

Hello. I am trying the affiliate program on opencart 3.0x . I just noticed, that the comission is being given to the entire order_total, and that includes shipping. Is there way to give comission to the subtotal instead, or to resctict shipping from it somehow?

Thank you.

Share this post


Link to post
Share on other sites
this:	               
//START AFFILIATE INTEGRATION			
			$jrox = mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
			$sql = 'SELECT * FROM  `' . DB_PREFIX . 'order` WHERE order_id = ' . (int)$this->session->data['order_id'];
			$jrox2 = mysqli_query($jrox, $sql);
			$aff_data = mysqli_fetch_assoc($jrox2);	
			$aff_integrate = file_get_contents('https://www.somewebsite.com/affiliates/sale/amount/' . $aff_data['total'] . '/trans_id/' . $this->session->data['order_id'] . '/tracking_code/' . $_COOKIE['jamcom']);
			//END AFFILIATE INTEGRATION

Share this post


Link to post
Share on other sites

Hi,

Check your order table in your prestashop database and see if there is another column that represents the subtotal, and not just the total.

Share this post


Link to post
Share on other sites

there is no separate column for sub_total in order table, just total in opencart, however there is a code sub_total un order_total table.  how can i refer to that?

Edited by someone

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...