Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate add-on authorized products


Rezolles_Net

Recommended Posts

This is official thread for : OSC-Affiliate add-on authorized products

 

 

 

Dear contributer,

 

There is some weakness within this contribution.When "we" disable some products in admin,affiliaters can "build the link" by clicking at the product section (product_info.php).Can someone make the button hidden when the item is not allowed?

 

 

Thx :blush:

Link to comment
Share on other sites

  • 1 month later...
This is official thread for : OSC-Affiliate add-on authorized products

Dear contributer,

 

There is some weakness within this contribution.When "we" disable some products in admin,affiliaters can "build the link" by clicking at the product section (product_info.php).Can someone make the button hidden when the item is not allowed?

Thx :blush:

 

I Have Same Probs. But I Can Not Hide It, Please Help Some One.

Link to comment
Share on other sites

i thought it was the finder that was suppose to fix it and post a new version :P try this

 

look for

 

  } else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

then add " and p.affiliate_allow_product = 1" to is so it looks like the following

 

  } else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'  and p.affiliate_allow_product = 1");

 

Then find this as installed by the affilliate contrib:

 

//affiliate build a link begin
	if (tep_session_is_registered('affiliate_id')) {

 

Add " && ((int)$product_info['affiliate_allow_product'] == 1)" to it so that it looks like the following:

 

//affiliate build a link begin
	if (tep_session_is_registered('affiliate_id') && ((int)$product_info['affiliate_allow_product'] == 1)) {

 

hope that helps, it's not tested. please post you result for others.

Link to comment
Share on other sites

sorry, revised:

 

look for in product_info.php

 

  } else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

then add ", p.affiliate_allow_product" to is so it looks like the following

 

  } else {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.affiliate_allow_product from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

Then find this as installed by the affilliate contrib:

 

//affiliate build a link begin
	if (tep_session_is_registered('affiliate_id')) {

 

Add " && ((int)$product_info['affiliate_allow_product'] == 1)" to it so that it looks like the following:

 

//affiliate build a link begin
	if (tep_session_is_registered('affiliate_id') && ((int)$product_info['affiliate_allow_product'] == 1)) {

 

hope that helps, it's not tested. please post you result for others.

Link to comment
Share on other sites

  • 2 years later...
Nvm, i found out the solution, lol

 

Insert in your products table this from a tool like MyPHPAdmin at your host:

 

ALTER TABLE `products` ADD `affiliate_allow_product` TINYINT(1) DEFAULT "1" NOT NULL

 

Should be fine..

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...