Jump to content



Latest News: (loading..)

osC3 Multilangism


  • Please log in to reply
4 replies to this topic

#1   Gergely

Gergely
  • Community Team
  • 528 posts
  • Real Name:Gergely Tóth
  • Gender:Male

Posted 27 August 2009 - 04:24 AM

Hi,

Some contribution be constucted in this topic. Collect them.
Header Footer Content Modules
SCM
v3

and some rewrites :-)

#2   musicman3

musicman3
  • Members
  • 80 posts
  • Real Name:Alexander Kholodov
  • Gender:Male
  • Location:Russia, Saint-Petersburg

Posted 27 August 2009 - 08:46 AM

Hi Gergely  :) ! I have noticed a problem with taxes. At tax addition in Admin Tools - "Configuration-Configuration-My Store-Displayed the price with the tax-True". The new goods in Index.php. I am displayed with the price without the tax. In Box-New Products all OK. In Viewed products the price without the tax. In a trash can of the buyer all OK - with the tax. You thought as to correct it?

Edited by musicman3, 27 August 2009 - 08:47 AM.

osCommerce 3.0 на русском языке (русификация, настройка, модули, обсуждение) - смотрите в профиле мой сайт.

#3   musicman3

musicman3
  • Members
  • 80 posts
  • Real Name:Alexander Kholodov
  • Gender:Male
  • Location:Russia, Saint-Petersburg

Posted 27 August 2009 - 03:17 PM

I have noticed that this problem is connected with "Products Variant". In Admin Tools-Content-Add Products-click name Products - price ZERO $ (0 $). Only this goods have a problem with display of taxes. The goods without Variants display the price in Admin Tools. Also the goods with the tax do not display an all-round price in Admin Tools. It is similar to the general problem with taxes for Variant Products.
osCommerce 3.0 на русском языке (русификация, настройка, модули, обсуждение) - смотрите в профиле мой сайт.

#4   Gergely

Gergely
  • Community Team
  • 528 posts
  • Real Name:Gergely Tóth
  • Gender:Male

Posted 27 August 2009 - 08:57 PM

View Postmusicman3, on Aug 27 2009, 05:17 PM, said:

I have noticed that this problem is connected with "Products Variant". In Admin Tools-Content-Add Products-click name Products - price ZERO $ (0 $). Only this goods have a problem with display of taxes. The goods without Variants display the price in Admin Tools. Also the goods with the tax do not display an all-round price in Admin Tools. It is similar to the general problem with taxes for Variant Products.

Ok. I try to find in source tomorrow.
Header Footer Content Modules
SCM
v3

and some rewrites :-)

#5   Koeroesi86

Koeroesi86
  • Members
  • 1 posts
  • Real Name:Kőrösi Krisztián

Posted 25 March 2010 - 11:37 AM

View Postmusicman3, on 27 August 2009 - 03:17 PM, said:

I have noticed that this problem is connected with "Products Variant". In Admin Tools-Content-Add Products-click name Products - price ZERO $ (0 $). Only this goods have a problem with display of taxes. The goods without Variants display the price in Admin Tools. Also the goods with the tax do not display an all-round price in Admin Tools. It is similar to the general problem with taxes for Variant Products.
It is a bug, and I've a small, but powerful solution:

add this function to the catalog/includes/classes/product.php:
function getVariantMinPriceTaxClass() {
	  $price = null;
	  $tax_id = null;

	  foreach ( $this->_data['variants'] as $variant ) {
		if ( ($price === null) || ($variant['data']['price'] < $price) ) {
		  $price = $variant['data']['price'];
		  $tax_id = $variant['data']['tax_class_id'];
		}
	  }

	  return ( $tax_id !== null ) ? $tax_id : 0;
}

mod the getPriceFormated function with this:

next to the if( $this->hasVariants() ) {, about #line 240

Original:
$price = $osC_Currencies->displayPrice($this->getVariantMinPrice(), $this->_data['tax_class_id']) . ' =>!&nbsp;';

New:
$price = $osC_Currencies->displayPrice($this->getVariantMinPrice(), $this->getVariantMinPriceTaxClass()) . ' =>!&nbsp;';

Hope this will be in the next release... :)

Cheers: Chris