Jump to content

Recommended Posts

@MITCH70,

Sorry, my fault. I forgot to update that file in the package.

Please use this new one. Only replace catalog/discount_code.php:

 

Discount_Codes_5.0.0_BS_beta_02.zip

Share this post


Link to post
Share on other sites

New Version 5.0.0. uploaded:

Changes:

  • Added support for EDGE BS4
  • Removed ht-Module
  • Moved validation script from ht to content modules
  • Moved code from application_top.php into discount_code.php
  • Added checkout payment content module to replace code injection in HT module
  • Added install warning for required OT module to content modules
  • Added condition to show "Apply" button in shopping cart module only if "Ship in Cart" Order Totals Module is present.
  • Updated template names to actual naming standard
  • Updated template calls in content modules to actual auto inclusion
  • Moved html output to content module template files
  • Normalized True/False typo in OT module
  • Hooked modifications in checkout_process.php and paypal standard files.

 

@MITCH70, thanks for testing

@Tsimi, maybe the main description of the addon could be updated. I have no privileges to edit it, can you please.

Share this post


Link to post
Share on other sites

Maybe just that there are now versions for BS3 and BS4 included

Share this post


Link to post
Share on other sites
Posted (edited)

@raiwa

Never thought about testing the customers side but found a little bug. When I go to My Order History and clicking on View buton from the orders made you get ( 1054 - Unknown column 'discount_codes' in 'field list' ) It’s caused by the change made into the $order_query in includes/classes/order.php. When replace only the query with the original it will run with no problem. Other solution that works is to use the query change and create the column into the database table Orders.

Then test it multiple times and it works fine but cannot see what change it made into the database. Maybe you can try it also.

Edited by MITCH70

Share this post


Link to post
Share on other sites

Hello @MITCH70,

the mods in order.php should only be applied if you are using paypal standard. The column is then added when the ot_discount module is installed (paypal standard must be installed).

Share this post


Link to post
Share on other sites

Hello @raiwa

Is there any change you add the hability to apply the discount for products attributes? For example to apply the discount for only products that has a product attribute selected.

Best regards

Share this post


Link to post
Share on other sites

Hello, sorry there is no plan to do this. A workaround would be to use different products instead of attributes.

Share this post


Link to post
Share on other sites

Hi, I understand.

Not for me but for your addon that would be a good functionallity, in case you've a attribute in stock and want to make a promotion in all products in your store.

Also I was thinking about a workaround, I create a coupon for all products (individually - some bulk creation in the database), and at the checkout_payment (where customers input the coupon) check the products attributes if it has the attribute I need and insert it automatically but it's not possible to insert two or more discount codes.

So probably I'll do a bulk price change for that attribute, but the issue is that some products have different prices.. Instead of something like 30%, I discount a fixed price.

Best regards. 

Share this post


Link to post
Share on other sites

Anyone knows a simple way to change the price in any class/module? As there's no plan to add a functionality like this, I would appreciate if someone could give me some hints do make something manually like: if product has X attribute selected gets 20% discounts on that product without messing with the order total or something else.

Something that wouldn't require a lot of code to discount code bs or a bulk price change on the database?

I would appreciate any help. Best regards.

Share this post


Link to post
Share on other sites

Hola Raiwa, he instalado la ultima versión y creo que hay un problema en el modulo de descuento en shopping_cart.php en relacion al modulo order total.
Cuando pones el código de descuento en el campo descuento y pulsas Aplicar, no se muestra el descuento en el calculo de totalización.
La página se recarga co el descuento aplicado, pero no se muestra en el modulo Total Estimado.
Si vuelves a pulsar el boton Aplicar, se recarga la pagina de nuevo y ya se muestra el descuento en el modulo Total Estimado.

Para hacer las pruebas tienes que desloguearte y loguearte de nuevo, por lo que he tenido que añadir en el archivo logoff.php el código:

if ( tep_session_is_registered('sess_discount_code') ) {
  tep_session_unregister('sess_discount_code');
}

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hola Fernando,

Please post in english on the public forum.

I'm not sure if you are referring to EDGE/Phoenix BS 4.

The latest discount coupon version is for BS4 and the modular shopping cart and ship in  cart are not yet updated to BS4.

So something doesn't fit. Please tell me which exact versions you are running.

Un saludo cordial
Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites
Posted (edited)

@f.figue Fenando,

I'm sorry forget my before message. I realized now that I have both, BS3 and BS4 version included in 5.0.0. Oh my memory 😕

OK. The problem seems to be that the session register is now included in the content module, so it's sensitive to the sort order. If the discount module is placed after the order total module, the discount code is not yet session registered when the order total module is processed and does not show it until the next page load.

Please try to move the discount module before the order total module and let me know if it works then.

I'll have a look and will fix it with the next update.

Probably I'll remove the BS3 support from version 5.0 and use a sitewide hook to register the discount code for Phoenix BS4. Then the session unregister on logout can be also added back there.

It's easier than to add again the ht module. Frozen and EDGE BS3 users can use the old version.

@Tsimi your thoughts?

Edited by raiwa

Share this post


Link to post
Share on other sites
Posted (edited)

@f.figue Fernando,

If you updated this on your live store and do not wants to revert to the old version, you can aply the following hot-fix:

In shopping_cart.php

before:

  $breadcrumb->add(NAVBAR_TITLE, tep_href_link('shopping_cart.php'));

  require('includes/template_top.php');

add the lollowing:

  if (!tep_session_is_registered('sess_discount_code')) tep_session_register('sess_discount_code');
  if (!empty($_GET['discount_code'])) $sess_discount_code = tep_db_prepare_input($_GET['discount_code']);
  if (!empty($_POST['discount_code'])) $sess_discount_code = tep_db_prepare_input($_POST['discount_code']);

 

Edited by raiwa

Share this post


Link to post
Share on other sites

New version uploaded:

Version 5.1.0 Phoenix

Changes:

  • Removed support for earlier EDGE versions
  • Fix for discount not showing on first page load in ship in cart order total module in shopping cart, disable "Apply" button until code is validated.
  • Added sitewide hook for session unregister of discount code on logoff ( @burt, sitewide hook used for the first time 😀)

This Package will be separated in a neew addon, once a proper label for Phoenix version is available.

Share this post


Link to post
Share on other sites
56 minutes ago, raiwa said:
  • Added sitewide hook for session unregister of discount code on logoff ( @burt, sitewide hook used for the first time 😀)

:thumbsup: I truly believe that these sitewide hooks are a step forward :D 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

I have Discount Code 5.0.0 installed on an EDGE BS4 install and I'm not seeing the discount code box at all. I suspect it is me that's missing something so if someone could tell me where I should see it it would be much appreciated.

Share this post


Link to post
Share on other sites
On 5/31/2019 at 7:36 PM, MITCH70 said:

Hi,

New files did work almost for me. Only in shopping cart its not showing the validation icons and border is different.
Maybe I forgot something and will check the files again.

discount.jpg.08e320165af9b57fdb9c03c6a33836f3.jpgdiscount2.jpg.06c6ae414982aca9eb688ada577d054e.jpg

Ignore my last post, I'd not installed the modular shopping cart. I'm actually having the same issue as above.

Share this post


Link to post
Share on other sites
41 minutes ago, LeeFoster said:

Ignore my last post, I'd not installed the modular shopping cart. I'm actually having the same issue as above.

Please revise your installation.

Share this post


Link to post
Share on other sites

Please post a screenshot, explain what exact fails and let me know which EDGE version (download date, commit) you are using.

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

×