TomatoCart

TomatoCart Community
Welcome, Guest
Please Login or Register.    Lost Password?

Price Variant
(1 viewing) (1) Guest
Go to bottomPage: 12345
TOPIC: Price Variant
*
#14156
Re:Price Variant 3 Years, 1 Month ago Karma: 18
the code that i posted before should do that
i modify some of the part below

Code:


// ADD: 20110615
$price = $Qvariants->value('products_price');
        $display_price = $osC_Currencies->displayPrice($price, $this->_data['tax_class_id']);
        $products_variants[$product_id_string]['old_price'] = $osC_Currencies->displayPrice($price, $this->_data['tax_class_id']);
if (is_object($osC_Services) ){
            if($osC_Services->isStarted('specials')) {        
              global $osC_Specials;

              if ($new_price = $osC_Specials->getPrice(osc_get_product_id($product_id_string, $variants))) {
                $price = $new_price;
                $display_price = $osC_Currencies->displayPrice($price, $this->_data['tax_class_id']);
                    
              } else {


              }
            }
        } else {
            
                require_once(DIR_FS_CATALOG . 'includes/classes/specials.php');

            $osC_Specials = new osC_Specials();
            
            if ($new_price = $osC_Specials->getPrice(osc_get_product_id($product_id_string, $variants)) {
                $price = $new_price;
                $display_price = $osC_Currencies->displayPrice($price, $this->_data['tax_class_id']);
                     
              } else {


              }
        }

$products_variants[$product_id_string]['price'] = $price;
$products_variants[$product_id_string]['display_price'] = $display_price;


int2k
Team Member
Posts: 620
graphgraph
User Offline Click here to see the profile of this user
Gender: Male p_heri2000 duakilo.net@gmail.com duakilodotnet p_heri2000@hotmail.com Location: Indonesia Birthday: 04/28
The administrator has disabled public write access.
 
#16654
Re:Price Variant 2 Years, 8 Months ago Karma: 0
int2k this work for sure? and where I must do this change? In what file?
focusoft
Place Your Bussines At The Top Of Search Engines
Senior Boarder
Posts: 53
graphgraph
User Offline Click here to see the profile of this user
Gender: Male focusoft2008 FocuSoft Design focusoft2008 Location: Craiova, Romania Birthday: 03/03
The administrator has disabled public write access.
 
#16655
Re:Price Variant 2 Years, 8 Months ago Karma: 0
I just check includes\classes\product.php and I think the problem is here:

Code:

    function getPriceFormated($with_special = false) {
      global $osC_Services, $osC_Specials, $osC_Currencies;

      $price = '';
      if ($this->isGiftCertificate() && $this->isOpenAmountGiftCertificate()) {
        $price = $osC_Currencies->displayPrice($this->_data['open_amount_min_value'], $this->_data['tax_class_id']) . ' ~ ' . $price = $osC_Currencies->displayPrice($this->_data['open_amount_max_value'], $this->_data['tax_class_id']);;
      } else {
        if (($with_special === true) && is_object($osC_Services) && $osC_Services->isStarted('specials') && ($new_price = $osC_Specials->getPrice($this->_data['id']))) {
          $price = '<s>' . $osC_Currencies->displayPrice($this->_data['price'], $this->_data['tax_class_id']) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $this->_data['tax_class_id']) . '</span>';
        } else {
          $price = $osC_Currencies->displayPrice($this->getPrice(), $this->_data['tax_class_id']);
        }
      }

      return $price;
    }



Here is no code for variants if the Special is started...
focusoft
Place Your Bussines At The Top Of Search Engines
Senior Boarder
Posts: 53
graphgraph
User Offline Click here to see the profile of this user
Gender: Male focusoft2008 FocuSoft Design focusoft2008 Location: Craiova, Romania Birthday: 03/03
The administrator has disabled public write access.
 
Go to top Page: 12345
Moderators: creativegenius

Latest Blog Post

TomatoCart v1.1.7 to v1.1.8 Upgrade Guide!

The upgrade guide is a step-by-step tutorial to help users to upgrade TomatoCart v1.1.7 to v1.1.8. If you have not yet updated to v1.1.7, please review its upgrade guide before applying these changes. [...]

By TomatoCart | august 21, 2012

contact_us

info@tomatocart.com
partner@tomatocart.com
Facebook Google+ Linkedin Twitter

Newsletter Subscription

Fork us on GitHub