Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Actual Attributes total


nainesh

Recommended Posts

hi

 

I've got the most recent actual attributes installed on my site. However a couple of problems.

 

1) If i have discounted the price of a product (specials). This price doesn't show up in the drop down menu for the customer.

 

2) When adding discounted attribute products to the shopping cart, the sub total displays the incorrect price

 

for an example you can visit

http://www.artsuppliesuk.co.uk/product_inf...products_id/206

 

thanks in advance to anyone who can help

 

nainesh

Link to comment
Share on other sites

  • 2 weeks later...

I got the same issue with multiple options.

 

In the file, /catalog/include/classes/shopping_cart.php about line 269.

 

Change to the following:

 

if ($attribute_price['options_values_price'] > '0') {
                  if ($price_prefix == '') {

  	 if (ceil($option_price) != ceil($products_price))
  	 {
     // $this->total += tep_add_tax($attribute_price['options_values_price'], $products_tax) * $qty;
     $this->total += tep_add_tax(tep_adjust_price($option_price, $products_price), $product_tax) * $qty;
     // echo '<br><bR>TOTAL: '.($qty * tep_add_tax($attribute_price['options_values_price'], $products_tax)).'<br><br>';
  	 }
  	 else
  	 {
             if ( ceil($attribute_price['options_values_price']) != ceil($products_price) ) $this->total += tep_add_tax($products_price, $products_tax) * $qty;
     // $this->total += tep_add_tax($products_price, $products_tax) * $qty;
     $this->total += tep_add_tax(tep_adjust_price($option_price, $products_price), $product_tax) * $qty;
  	 }

 

It seems to work, but I need to thoroughly test this.

 

Hope this helps.

Link to comment
Share on other sites

I have had lots of problems with this module, but the weird thing is this:

 

When you add products to your shopping cart, the subtotal might be wrong.

 

But if you continue to checkout, the last confirmation screen gives you correct subtotals.

Link to comment
Share on other sites

I end up not using this contribution, but modify the original code to display the actual price.

 

 

product_info.php:

if ($products_options['options_values_price'] != '0') {

	 ### Display Actual Price ###
	 if ( $products_options['price_prefix'] == '+' ) {
   $actual_price = $product_info['products_price'] + $products_options['options_values_price'];
	 } else {
   $actual_price = $product_info['products_price'] - $products_options['options_values_price'];
	 }
           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($actual_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
         }
   if ($products_options['options_values_price'] == '0' && $products_options['price_prefix'] == '+') {
	 if ( $products_options['price_prefix'] == '+' ) {
   $actual_price = $product_info['products_price'] + $products_options['options_values_price'];
	 }
           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($actual_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
         }

       }

 

If the option price is the same as the base price, just use the + prefix and left the price blank.

Link to comment
Share on other sites

  • 4 months later...
Anyone know how to fix this?  I am having the same problem.  You can see what is happening on this page.  When you add a product to the cart the price is doubled.

 

 

Hi Al,

 

It seems like you got the problem fixed. I still have the same problem BUT the doubling of the price actaully happens with the attribute. So if I buy a product that's $100 with a $20 attribute, the sum of the product will show up to be $140.

 

 

Can someon help me here?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...