Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Discount Plus doesn't show up discount in checkout


juanpalomo

Recommended Posts

I have installed Discount Plus: Discount Plus Contribution and thought everything was working fine, cause the price shown in shopping_cart.php was the right one. Now I have done a test buy and seen that in the checkout_confirmation.php the price shown is without the discount.

 

I think the problem must be in order.php, but I have tried everything and I can't figure out where's the failure.

 

I have also installed other contributions, all working fine: Master Products, Minimum Product Quantity, Minimum Order per Product, ... Could it be that they are not working well together with Discount plus?

 

Has anyone had the same problem and found already a solution? Any suggestion will be welcome, thanks.

Link to comment
Share on other sites

I think the problem must be in order.php, but I have tried everything and I can't figure out where's the failure.

 

 

Well, I have continued with my experiments and I have found a solution. I don't know if it's totally ok, but it's working for me. You can try it if you have one day the same problem:

 

In includes/classes/order.php I changed this code:

 

        $this->products[$index] = array('qty' => $products[$i]['quantity'],
                                       'name' => $products[$i]['name'],
                                       'model' => $products[$i]['model'],
                                       'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
                                       'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
                                       [B]'price' => $products[$i]['price'],
                                       'final_price' => $products[$i]['price'] + $attributes_price,[/B]
                                       'weight' => $products[$i]['weight'],
                                       'id' => $products[$i]['id']);
 // END www.ocean-internet.de - Discount Plus

 

into this:

 

         $this->products[$index] = array('qty' => $products[$i]['quantity'],
                                       'name' => $products[$i]['name'],
                                       'model' => $products[$i]['model'],
                                       'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
                                       'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
                                       'price' => $discountplus_data['value'],
                                       'final_price' => $discountplus_data['value'] + $attributes_price,
                                       'weight' => $products[$i]['weight'],
                                       'id' => $products[$i]['id']);
 // END www.ocean-internet.de - Discount Plus

 

As you see, I've changed just the 'price' and 'final_price' in the array.

 

I think that problably it's going to work just with "valuetyp"= "endprice", and not with "price" or "percent", but I personally don't need this two options at this time.

 

Anyway, if someone of you has a "more elegant" solution, it would be nice if you post it here. :blush:

Link to comment
Share on other sites

SORRY, forget the whole thread!!! I found the solution, I mean, THE REAL ONE, the other one was working only for products with discount, for the rest the price was always 0.

It was just a problem with some code outside a "}" instead of inside it, in includes/classes/shopping_cart.php. GRRRR... Anyway... I have learned something, at least that I don't have to post "solutions" until I'm totally sure about them and I have checked them at least 100 times... :-"

 

Sorry again, you can delete the thread if you want ...

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...