Jump to content
Latest News: (loading..)
douglaswalker

Discount Module In Shopping Cart

Recommended Posts

EUREKA!!!!!

I finally got the DISCOUNT CODES to work!

I found a copy of the BOOTSTRAP version (Responsive something or other), deleted all my other versions, installed Bootstrap, then made sure every addon I installed specifically mentioned BS or Bootstrap and everything installed like clockwork!

(Everything, that is, except Customer Checkout Blacklist)

And BTW, is it just me or is there no way to logoff once you've created an account?

Share this post


Link to post
Share on other sites

@@stevenlemon

And BTW, is it just me or is there no way to logoff once you've created an account?

 

It might be just you...I have a logoff link in the footer on my BS site that works....you might need to adjust or install a module for it.  Have a look.

 

Dan

Share this post


Link to post
Share on other sites

Where do I look? Are you using Bootstrap?

 

Yes...I'm using the bootstrap version....go to admin->modules->content and install the account block.

 

Dan

Share this post


Link to post
Share on other sites

I have a modified bootstrap and there is a my account link in the top navbar where its possible to log out or in depending on what you want to do. may not be the same on all versions.


REMEMBER BACKUP, BACKUP AND BACKUP

Before installing the official version of oscommerce first look at a responsive version here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

on the checkout_confirmation.php shows the discount coupon {Discount Coupon ???? applied:}

in shopping_cart.php

 

upon clicking apply it doesn't show the Discount Coupon ???? applied:

 

only way shows is when i go thru the process in checkout_confirmation.php then when i rehash the page it shows the Discount Coupon ???? applied: then i rehash it again it goes away. 

 

1. codes gets erased when i go thru the checkout again

2. code Discount Coupon ???? applied: doesn't show in shopping_cart.php

 

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

  if (!tep_session_unregister('coupon')) tep_session_register('coupon');
  $coupon = tep_db_prepare_input($HTTP_POST_VARS['coupon']);

  if (is_array($payment_modules->modules)) {
    $payment_modules->pre_confirmation_check();
  }

  if( tep_not_null( $coupon ) && is_object( $order->coupon ) ) { 
    $order->coupon->verify_code();
    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG != 'true' ) {
          if( !$order->coupon->is_errors() ) { //if we have passed all tests (no error message), make sure we still meet free shipping requirements, if any
              if( $order->coupon->is_recalc_shipping() ) tep_redirect( tep_href_link( FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode( ENTRY_DISCOUNT_COUPON_SHIPPING_CALC_ERROR ), 'SSL' ) ); 
          } else {
              if( tep_session_unregister('coupon') ) tep_session_unregister('coupon');
              tep_redirect( tep_href_link( FILENAME_SHOPPING_CART1, 'error_message=' . urlencode( implode( ' ', $order->coupon->get_messages() ) ), 'SSL' ) );
          }
    }
    } else {
        if( tep_session_unregister('coupon') ) { 
      tep_session_unregister('coupon');
      require_once( DIR_WS_CLASSES.'discount_coupon.php' );
      if( discount_coupon::is_recalc_shipping() ) tep_redirect( tep_href_link( FILENAME_SHOPPING_CART1, 'error_message=' . urlencode( ENTRY_DISCOUNT_COUPON_SHIPPING_CALC_ERROR ), 'SSL' ) ); 
    }
}

 

-----------------------------------------------------------------
<?php
    if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>

<div class="shipcouon">

<?php echo tep_draw_input_fieldclear('coupon', 'if(this.value == &#39;Enter Promo Code Here&#39;) { this.value = &#39;&#39;; }', ''.ENTRY_COUPONS.'', $coupon); ?>


<?php echo tep_draw_couponcode(IMAGE_BUTTON_APPLY, 'submit', null, 'primary', null, ''); ?>

</div>
 

 


<?php
    }
?>

----------------------------------------------------------------html------------------------------------------------------

 

 

 

////
// Output COUPON
  function tep_draw_couponcode($title = null, $icon = null, $link = null, $priority = null, $params = null, $style = null) {
    static $button_counter = 1;

    $types = array('submit', 'button', 'reset');

    if ( !isset($params['type']) ) {
      $params['type'] = 'submit';
    }

    if ( !in_array($params['type'], $types) ) {
      $params['type'] = 'submit';
    }

    if ( ($params['type'] == 'submit') && isset($link) ) {
      $params['type'] = 'button';
    }

    if (!isset($priority)) {
      $priority = 'secondary';
    }

    $button = NULL;

    if ( ($params['type'] == 'button') && isset($link) ) {
      $button .= '<a ' . $button_counter . '" href="' . $link . '"';

      if ( isset($params['newwindow']) ) {
        $button .= ' target="_blank"';
      }
    } else {
      $button .= '<button';
      $button .= ' type="' . tep_output_string($params['type']) . '"';
    }

    if ( isset($params['params']) ) {
      $button .= ' ' . $params['params'];
    }

    $button .= 'id="couponapply" class="couponapply"';


    $button .= 'value="apply">';


    $button .= $title;

    if ( ($params['type'] == 'button') && isset($link) ) {
      $button .= '</a>';
    } else {
      $button .= '</button>';
    }

    $button_counter++;

    return $button;
  }

Share this post


Link to post
Share on other sites
On 5/30/2016 at 11:34 PM, Tsimi said:

@@douglaswalker

 

Hi Doug

 

I think that is what happens with the Shopping Cart Modules addon.

You can have the shipping estimator and/or estimated total and/or the discount input field where the customer can input his code and get an estimated total and then he can decide to go to the checkout or continue shopping.

To have that feature you need to install the shopping cart modules found here and then install the discount module which contains the additional piece for the shopping cart modules.

to much process, use coupon one time. every time you try to add a product you have to retype the coupon code. there is got a be away to use the coupon code one time without going thru this.

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

×