Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Minimum Advertised Price contribution with discount per category help please


  • You cannot reply to this topic
2 replies to this topic

#1 ericfrancis

  • Community Member
  • 9 posts
  • Real Name:Eric Francis
  • Gender:Male

Posted 28 December 2011, 19:25

Was manually installing the Minimum Advertised Price contribution and near the end I have run into an issue with one of my other modifications. The person who helped me set up the site is now in Afghanistan and .php is not my thing. I have a vendor who has a new MAP policy in effect January 1st and I am trying to get in compliance a.s.a.p.

In the instructions at this point is where I came acoss my discount by category modification.
3.6) includes/modules/product_listing.php
  1. Change This:
	case 'PRODUCT_LIST_PRICE':
		   	 $lc_align = 'right';
				if (tep_not_null($listing['specials_new_products_price'])) {
   To This:
	case 'PRODUCT_LIST_PRICE':
		 	   $lc_align = 'right';
				if ($listing['products_price'] < $listing['products_map'])
			 {
		   	   $lc_text = ' ' . MAP_WARNING;
			 }
				else if (tep_not_null($listing['specials_new_products_price'])) {

I basically need to have the site show retail when an item is searched and when the customer views the item detail or adds it to the cart they see the discount price. Both would be cool but add to cart is enough.

Here is the relevant code from my file:

case 'PRODUCT_LIST_PRICE':
  
	 if (($current_category_id == NULL) && ($temp_category_id != $listing[categories_id])) {
	#get the discount for this category
	#echo 'listing:', $listing[categories_id];
	#exit;
	$discount_sql = "SELECT amount FROM discount WHERE category_id = '$listing[categories_id]' LIMIT 1";
	$discount_query = tep_db_query($discount_sql);
	$discount = mysql_fetch_array($discount_query);  
	$temp_category_id = $listing[categories_id];
	#echo 'xx: ', $listing;
   }
  
	
			$lc_align = 'right';
			if (tep_not_null($listing['specials_new_products_price'])) {
			  $lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
			} else {
	# if there has been a discount found for this category, display the 'retail price' and 'our price';
	if (($discount[amount] != NULL) && ($discount[amount] != '0')) {  
				$lc_text = ' Retail Price:' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' <br>';
	   $lc_text .= ' Our Price:' . $currencies->display_price_w_discount($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']), $discount[amount]) . ' ';
			 }
	else {
	 $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' <br>';
	  }
   }
			break;

Thanks in advance for any help you can offer. Let me know if you need any files etc.
Eric

#2 ericfrancis

  • Community Member
  • 9 posts
  • Real Name:Eric Francis
  • Gender:Male

Posted 31 December 2011, 16:33

anyone?

#3 ericfrancis

  • Community Member
  • 9 posts
  • Real Name:Eric Francis
  • Gender:Male

Posted 04 January 2012, 16:20

bump