Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    Oct 2011
    Posts
    16
    Plugin Contributions
    0

    Default Re: Product Pricerange not working

    PM sent.

  2. #12
    Join Date
    Mar 2006
    Location
    NJ, USA
    Posts
    12
    Plugin Contributions
    0

    Idea or Suggestion The fix (was Re: Product Pricerange not working)

    I've just got this problem on one of my client site trying to use price ranges. Here is the solution. In /includes/functions_prices.php -> function zen_get_products_sale_discount_type we have to prepare separate select, if $product_id > 0.

    Now it's OK to have couple of sales depending on product price that will calculate attributes right way.

    Change

    Code:
    $salemaker_sales = $db->Execute("select sale_id, sale_status, sale_name, sale_categories_all, sale_deduction_value, sale_deduction_type, sale_pricerange_from, sale_pricerange_to, sale_specials_condition, sale_categories_selected, sale_date_start, sale_date_end, sale_date_added, sale_date_last_modified, sale_date_status_change from " . TABLE_SALEMAKER_SALES . " where sale_status='1'");
    to

    Code:
        // if set $product_id, we have to pay attention to price range limitation
        if($product_id > 0) {
        	$pricerange_base = zen_get_products_base_price($product_id);
        	$salemaker_sales = $db->Execute("select sale_id, sale_status, sale_name, sale_categories_all, sale_deduction_value, sale_deduction_type, sale_pricerange_from, sale_pricerange_to, sale_specials_condition, sale_categories_selected, sale_date_start, sale_date_end, sale_date_added, sale_date_last_modified, sale_date_status_change from " . TABLE_SALEMAKER_SALES . "
        	where sale_status='1'
        	and (sale_pricerange_from <= '" . $pricerange_base . "' or sale_pricerange_from = '0') and (sale_pricerange_to >= '" . $pricerange_base . "' or sale_pricerange_to = '0')");
        }else{
            $salemaker_sales = $db->Execute("select sale_id, sale_status, sale_name, sale_categories_all, sale_deduction_value, sale_deduction_type, sale_pricerange_from, sale_pricerange_to, sale_specials_condition, sale_categories_selected, sale_date_start, sale_date_end, sale_date_added, sale_date_last_modified, sale_date_status_change from " . TABLE_SALEMAKER_SALES . " where sale_status='1'");
      }
    Quote Originally Posted by Ajeh View Post
    Price by Attribute and SaleMaker will produce odd issues on things like the Price Range ...

    I do not have a solution for that at this time but will look into it further ...

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 2
    Last Post: 24 Feb 2011, 04:54 PM
  2. product not working?
    By dwalk83 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 28 Aug 2006, 09:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR