Changeset 456741
- Timestamp:
- 10/28/2011 03:31:40 PM (14 years ago)
- Location:
- dukapress/trunk
- Files:
-
- 2 edited
-
js/dukapress.js (modified) (1 diff)
-
php/dp-products.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dukapress/trunk/js/dukapress.js
r398899 r456741 31 31 } 32 32 }); 33 } 34 else if (buy_now_present == '3') { 35 var affiliate_url = jQuery('#dpsc_affiliate_url_'+productId).val(); 36 window.open(affiliate_url,'dp_product_'+productId); 37 jQuery('div.dpsc_update_icon', jQuery(this)).css('display', 'none'); 33 38 } 34 39 else { -
dukapress/trunk/php/dp-products.php
r456734 r456741 38 38 if ($buy_now) { 39 39 $action = 'dpsc_paypal_button'; 40 } 41 //Dukapress affiliate mode 42 if ($affiliate) { 43 $action = 'dpsc_affiliate'; 40 44 } 41 45 // if ($direct) { … … 76 80 $dropdown_content .= '</div><div class="clear"></div>'; 77 81 $custom_fields_output['dropdown'] = $dropdown_content; 78 if ($dp_shopping_cart_settings['dp_shop_mode'] != 'inquiry' ) {82 if ($dp_shopping_cart_settings['dp_shop_mode'] != 'inquiry' || !$affiliate) { 79 83 $custom_fields_output['end'] = '<script language="javascript" type="text/javascript"> 80 84 var flag=0;var SalePriceLabel1=0; //whether ie or ff … … 195 199 $buy_now_present = '2'; 196 200 } 201 //redirect to Affiliate 202 if ($affiliate) { 203 $value_atc = __('Buy Now', "dp-lang"); 204 $buy_now_present = '3'; 205 } 197 206 //Out of stock disabled button 198 207 $disabled_add_to_cart = ''; … … 201 210 } 202 211 $custom_fields_output['add_to_cart'] = '<input ' . $disabled_add_to_cart . ' type="submit" class="dpsc_submit_button" id="dpsc_submit_button_' . $product_id . '" name="dpsc_add_to_cart" value="' . $value_atc . '" />'; 212 if ($affiliate) { 213 if(isset($all_custom_fields['affiliate_url'][0])){ 214 $affiliate_url = $all_custom_fields['affiliate_url'][0]; 215 } 216 else if(isset($dp_shopping_cart_settings['affiliate_url'])) { 217 $affiliate_url = $dp_shopping_cart_settings['affiliate_url']; 218 } 219 $custom_fields_output['add_to_cart'] .= '<input type="hidden" id="dpsc_affiliate_url_' . $product_id . '" name="dpsc_affiliate_url_' . $product_id . '" value="' . $affiliate_url . '" />'; 220 } 203 221 $custom_fields_output['add_to_cart'] .= '<input type="hidden" id="dpsc_buy_now_button_present_' . $product_id . '" name="dpsc_buy_now_button_present_' . $product_id . '" value="' . $buy_now_present . '" />'; 204 222 return $custom_fields_output;
Note: See TracChangeset
for help on using the changeset viewer.