Jump to content
Latest News: (loading..)

Recommended Posts

@@Tsimi

 

Thanks for your answer, I use the latest version of this addon and the BS version of oscommerce

 

I think I've found the solution, please check if this is correct.

In the file catalog/includes/modules/order_total/ot_discount.php

Search (5 times):
   $order->products[$i]['price']
 

Replace by:

  $order->products[$i]['final_price']

 

*** $order->products[$i]['final_price'] Include the product price + the attribute price ***

 

That is all.

 

 

Share this post


Link to post
Share on other sites

I just tested this in my local test shop (Edge) and I cannot recreate that problem.

Here is what I get.

 

Graphic card $299

Attribute $100

------------------

Sub-total $399

Discount(10%) $40

Shipping $5

------------------

Total $364

 

If that fix of yours works for you use it. But I would recommend that you really test this well. The attribute value is usually included within the discount calculation so not sure what went wrong at your end.

 

 

Is anyone else having the same issue as f.figue here? @@raiwa ? Anyone?

Edited by Tsimi

Share this post


Link to post
Share on other sites

Hello @@Tsimi @f.figue,

 

Yes, Fernando is right. Lambros in your example the error doesn't show because it doesn't apply tax. The tax part isn't discounted for the attribute price.

Fernandos fix works for me correct in all cases: show prices with tax on and off. I also checked for discount only applied to one product and all looks good. However Lambros, please do your own checks before update.

 

Here my examples:

 

Original ot_discount.php:

display tax set to false:
1 x      Matrox G200 MMS
  - Memory: 4 mb
  - Model: Premium     $399.99
Sub-Total:     $399.99
Discount 10% :     -$40.00
Flat Rate ():     $5.00
FL TAX 7.0%:     $25.20
Total:     $400.89
Should be 390.19!!

display tax set to true:
1 x      Matrox G200 MMS
  - Memory: 4 mb
  - Model: Premium     $427.99
Sub-Total:     $427.99
Discount 10% :     -$42.80
Flat Rate ():     $5.00
FL TAX 7.0%:     $25.20
Total:     $400.89
Should be 390.19!!

Fernandos fix:
display tax set to false:
1 x      Matrox G200 MMS
  - Memory: 4 mb
  - Model: Premium     $399.99
Sub-Total:     $399.99
Discount 10% :     -$40.00
Flat Rate ():     $5.00
FL TAX 7.0%:     $25.20
Total:     $390.19 correct!!

display tax set to true:
1 x      Matrox G200 MMS
  - Memory: 4 mb
  - Model: Premium     $427.99
Sub-Total:     $427.99
Discount 10% :     -$42.80
Flat Rate ():     $5.00
FL TAX 7.0%:     $25.20
Total:     $390.19 correct!!

 

 

Gracias Fernando!!

 

Best regards

Rainer

Share this post


Link to post
Share on other sites

Just tested it again and I could recreate the above. I applied f.figues fix and uploaded a new version to the addons section.

Thanks again to @f.figue for the fix and @@raiwa for testing and confirming. :thumbsup:

Share this post


Link to post
Share on other sites

Hello Stefan @@stefan21,

 

The Discount Codes BS version with 2.3.4 Bootstrap:

http://addons.oscommerce.com/info/9460

 

and the older version with 2.3.4 Standard (stated for 2.3.1, but should work with 2.3.4:

http://addons.oscommerce.com/info/7644

 

rgds

Rainer

Share this post


Link to post
Share on other sites

@@stefan21

 

I am not sure but I remember somebody mentioning the same thing. I am also not sure if they ever fixed it.

That Discount Codes Addon is a different one from this one here in this thread.

I think @@greasemonkey worked with it but not sure how he handled that PP Express issue.

 

The support thread for that addon is here

 

http://forums.oscommerce.com/topic/213019-contribution-discount-coupon-codes/

Share this post


Link to post
Share on other sites

Hello Stefan @@stefan21,

 

Sorry, I was wrong. The correspondent 2.3.4 Standard version is that one:

http://addons.oscommerce.com/info/7700

 

It is compatibel with PayPal Express and if you add the ship in cart add-on, it is possible to use discount codes even using the paypal button in shopping cart.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

My question is in reference to the module found here.

 

To the best of my knowledge I have followed all of the install instructions to the letter. I have copied all required files and made the two file changes. The module installs just fine through the admin page and I am able to create an entry. However, upon checkout, an entry field for the discount code does not appear.

 

I have no errors, but I also don't have a functioning discount code :( Does anyone have a screenshot of what it is supposed to look like?

 

Please let me know what other information I may be able to give you. I am very much looking forward to this contrib. Any and all help would be greatly appreciated. Thank you in advance.

Share this post


Link to post
Share on other sites

What osC version are you using? This addon works only for osC bootstrap versions like GOLD and EDGE.

Did you install the header tags module?

Share this post


Link to post
Share on other sites

Hello Scott @@Snarg,

 

If you are using the Bootstrap version, you should also check if you have still the original code here in checkout_payment.php:

  <div class="contentText">
    <div class="form-group">
      <label for="inputComments" class="control-label col-sm-4"><?php echo TABLE_HEADING_COMMENTS; ?></label>

The discount code header tag references the first 2 lines to inject the discount code input field via javascript.

If you changed these lines, it will not work.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

 

Hello, Rainer!

How do I install Discount Codes BS - in the form of the shopping cart?

 

 

 

I want to place the module here:

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
  <div>
    ..................
    ............
  </div>
  ////////////////// Discount Codes 4.1 BS
   <?php echo $oscTemplate->getContent('shopping_cart_discount_code'); ?>
  //////////////// Discount Codes 4.1 BS END

  <div>
  <?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'button button-3d nomargin fright'); ?>
  <?php echo tep_draw_button(TEXT_PERESCHITAT, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'button button-3d notopmargin fright'); ?>
  </div>
</form>

I created a folder and put shopping_cart_discount_code to the module.
The module is displayed. See screenshot http://spido.ru/code.png
But I have a problem with the processing of the request.
I have to remove the form module and modify the link "Apply" button?

 

Can you suggest how to edit a module, for his work in the form of the shopping cart?

Thank you in advance!

 

 

Edited by spidometrs

No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

@@spidometrs,

 

Best and easiest way is to install:

Modular Shopping Cart BS

 

Otherwise the code should be

   	<div class="row">
    	<?php echo $oscTemplate->getContent('shopping_cart'); ?>
    </div>

The place is correct and you do not need to modify anything else.

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa

 

@@spidometrs,

 

Best and easiest way is to install:

Modular Shopping Cart BS

 

Otherwise the code should be

   	<div class="row">
    	<?php echo $oscTemplate->getContent('shopping_cart'); ?>
    </div>

The place is correct and you do not need to modify anything else.

 

In this case two buttons: IMAGE_BUTTON_CHECKOUT and TEXT_PERESCHITAT - remain above the form of coupons.
And it's wrong.
I want to place the shape of coupons above the buttons.
But then the <form></form> of coupons will be in the <form><form>Coupon Code</form></form> of the shopping cart.

Edited by spidometrs

No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

@@raiwa

 

Module shopping cart does not IMAGE_BUTTON_CHECKOUT button.
How to calculate the quantity of products and their prices?

Edited by spidometrs

No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

I want to place the module here:

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
  <div>
    ..................
    ............
  </div>
  ////////////////// Discount Codes 4.1 BS
   <?php echo $oscTemplate->getContent('shopping_cart_discount_code'); ?>
  //////////////// Discount Codes 4.1 BS END

  <div>
  <?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'button button-3d nomargin fright'); ?>
  <?php echo tep_draw_button(TEXT_PERESCHITAT, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'button button-3d notopmargin fright'); ?>
  </div>
</form>

You can also do it with this code. You can move the closing </form> tag before the discount code module call. The buttons do not need to be inside the form. They just do normal links to other pages, no form submission.

 

So the code could look like this:

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
  <div>
    ..................
    ............
  </div>
</form>
  ////////////////// Discount Codes 4.1 BS
   <?php echo $oscTemplate->getContent('shopping_cart_discount_code'); ?>
  //////////////// Discount Codes 4.1 BS END

  <div>
  <?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'button button-3d nomargin fright'); ?>
  <?php echo tep_draw_button(TEXT_PERESCHITAT, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'button button-3d notopmargin fright'); ?>
  </div>

Share this post


Link to post
Share on other sites

Hi, Rainer @@raiwa,

 

I found one problem:
If I enter the discount code, the module shows the price discount, the module order total, and exchanges the amount of payment.
After that, I clean a discount code, discounts from the field, and click the Apply button.
In this case, the discount all as shown in the module - order total.
Discount is not cleared.

It is not right.
If the discount field is empty, the discount should not be included in the counting.


No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

@@spidometrs, this is how it works, once applied the discount code it's stored in the order and will not be cleared.

 

Can you pease tell me in which files you applied changes to get the before problem to be fixed.

Share this post


Link to post
Share on other sites

I apply the latest updates Discount Codes 4.1 BS.

Edited by spidometrs

No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×