Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2020
    Location
    china
    Posts
    2
    Plugin Contributions
    0

    Default how to override the product's base price?

    in the function_price.php

    PHP Code:
    // -----
          // Give an observer the chance to override the product's base price.
          //
          
    $base_price_is_handled false;
          
    $products_base_price 0;
          
    $zco_notifier->notify('ZEN_GET_PRODUCTS_BASE_PRICE'$products_id$products_base_price$base_price_is_handled);
          if (
    $base_price_is_handled === true) {
              return 
    $products_base_price;
          } 
    i have add a new file

    PHP Code:
    class get_products_base_price extends base{


        public function 
    __construct()
        {

            
    $this->attach ($this, array(
                
    'ZEN_GET_PRODUCTS_BASE_PRICE',
            ));

        }
        public function 
    update(&$class$eventID$products_id$products_base_price$base_price_is_handled)
        {
         

        }

    how to return the $products_base_price, $base_price_is_handled to the function_price.php?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

    Default Re: how to override the product's base price?

    Quote Originally Posted by ubucanpa View Post
    in the function_price.php

    PHP Code:
    // -----
          // Give an observer the chance to override the product's base price.
          //
          
    $base_price_is_handled false;
          
    $products_base_price 0;
          
    $zco_notifier->notify('ZEN_GET_PRODUCTS_BASE_PRICE'$products_id$products_base_price$base_price_is_handled);
          if (
    $base_price_is_handled === true) {
              return 
    $products_base_price;
          } 
    i have add a new file

    PHP Code:
    class get_products_base_price extends base{


        public function 
    __construct()
        {

            
    $this->attach ($this, array(
                
    'ZEN_GET_PRODUCTS_BASE_PRICE',
            ));

        }
        public function 
    update(&$class$eventID$products_id$products_base_price$base_price_is_handled)
        {
         

        }

    how to return the $products_base_price, $base_price_is_handled to the function_price.php?
    Update your update function:
    Code:
        public function update(&$class, $eventID, $products_id, &$products_base_price, &$base_price_is_handled)
        {
         
    // Determine what the updated price will be, setting $products_base_price and setting $base_price_is_handled to true.
        }

  3. #3
    Join Date
    Jun 2020
    Location
    china
    Posts
    2
    Plugin Contributions
    0

    Default Re: how to override the product's base price?

    nice,thanks.

 

 

Similar Threads

  1. v156 Attribute Price adds the the product price in the product listing - How to stop?
    By Mattvickauto in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 30 Aug 2019, 06:15 PM
  2. Product pricing - base price + user price
    By toque_boy_ca in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 28 Jun 2010, 11:21 PM
  3. how to use Attributes exclude the base price
    By hoyin630 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Apr 2009, 05:06 PM
  4. Base price for product plus price by the foot?
    By kafer in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 19 Jan 2007, 12:17 AM

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