Jump to content
ednique

[Contribution] Ship In Cart

Recommended Posts

Thanks very much 8-), I need to make the grey container box that goes round the shipping estimator wider which code will I need to change please.

 

Kind Regards


Using Bootstrap 8-)

Share this post


Link to post
Share on other sites

Hello Jim @@jamo32,

 

If we are talking about bootstrap version, it is using the core panel class.

You can modify overwriting the class in user.css like any other bootstrap class. However it will change also the width of any other module using the same panel class.

It's nothing ship in cart module specific.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hello Jim @@jamo32,

 

Just thought about and it sounds like you are using standard version.

Sorry, you should mention which version you are using.

Then the first step would be to change line 41 in includes/modules/shipping_estimator.php to:

	<table width="100%" align="center"><tr valign="top"><td>

Then you may need to rewrite more styles for the td widths in the shipping module listing.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

@@jamo32,

 

Just uploaded new version 2.4.8. with the fix for module width of the standard version.

Share this post


Link to post
Share on other sites

Hi

 

Hello Jim @@jamo32,

 

SUpposed you refer to bootstrap version:

Instructions line 204:

Admin => Header Tags => select "Table Row Click jQuery" => Add "shopping_cart.php" in the Pages list
 

For the login button:

in: includes/modules/content/cart/cm_cart_shipping_estimator.php

                $ShipTxt .= '<div class="col-sm-12 estimator-padding">' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_SHIPPING_OPTIONS_LOGIN . tep_draw_button(MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_BUTTON_LOGIN, 'glyphicon glyphicon-log-in', tep_href_link('login.php'), 'btn-success btn-sm') . '</div>';

and:

              	      				 <div class="col-sm-12">' . tep_draw_button(MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_BUTTON_LOGIN, 'glyphicon glyphicon-log-in', tep_href_link('login.php'), 'btn-success btn-sm') . '</div>';

Hope this helps

 

rgds

Rainer

Tired to remove these lines of code and this removed the complete addon no shipping estimator in the cart when doing that.

 

Sorry for my ignorance lol, what would be the best way?

Thanks

Edited by jamo32

Using Bootstrap 8-)

Share this post


Link to post
Share on other sites

@@jamo32,

 

first of all to tell me which osc version you have. Bootstrap or Standard?

And make sure to install the correct version for your store.

Share this post


Link to post
Share on other sites

@@jamo32,

 

The first line you can complete remove.

 

For the second button you need to remove both lines:

            	$discounttxt .= '<div class="col-sm-12">' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_DISCOUNT_CODE_TEXT_LOG_IN . '</div>
              	      				 <div class="col-sm-12">' . tep_draw_button(MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_BUTTON_LOGIN, 'glyphicon glyphicon-log-in', tep_href_link('login.php'), 'btn-success btn-sm') . '</div>';

Or better remove the complete "else" statement:

then it should look like this:

          	if (tep_session_is_registered('customer_id')) {
          		$discounttxt .= '<div class="col-sm-12"><strong>' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_DISCOUNT_CODE_TITLE . '</strong></div>
              	      		     <div class="col-sm-5"><div class="form-group has-feedback">' . tep_draw_input_field('discount_code', $sess_discount_code, 'id="discount_code"') . '<span class="form-control-feedback" id="discount_code_status"></span></div></div>              	      		     
              	      		     <div class="col-sm-6"><a class="btn btn-default" role="button" href="_" onclick="return shipincart_submit(\'\');"><i class="glyphicon glyphicon-refresh"></i> '. IMAGE_BUTTON_UPDATE . ' </a> ' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_DISCOUNT_CODE_TEXT . '</div>';
            }
            $discounttxt .= '</div>

Sorry, I didn't say to remove the lines, I just showed where the button code is. A minimum of coding knowledge is required if you wish to customize something. And if you get already tired by removing twice a few lines, hire a developer. :)

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hi

 

Thanks for your help come across a weird problem using table shipping rate(by price) I cannot select free shipping(onshopping_cart.php)  when this is available when a customer spends a certain amount on table rate shipping module working fine on table rate when it's not free , while on the shopping_cart page?

 

Just to note the shipping works fine the rest of the checkout process.

 

Many Thanks

Edited by jamo32

Using Bootstrap 8-)

Share this post


Link to post
Share on other sites

@@jamo32,

 

can you please post your store URL (or send it in a personal message) and please also post your shipping modules (please upload the zipped files, do not post the code) and post the setup.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hello @@vampirehunter,

 

You can see it on my demo store:

http://www.sarfotostock.com/osCommerce234bs/

 

The module is placed at the bottom of the shopping cart page below the "Checkout" button or PayPal express payment button.

 

regards

Rainer

 

@@raiwa

 

Rainer do you still have a demo site up where we can see this contribution in action?

 

Dan

Share this post


Link to post
Share on other sites

Hello Jim @@jamo32,

 

Yes, it is not supposed in the module to use that kind of free shipping setup.

There is usually another module for free shipping used to show together with other shipping modules:

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

 

However the fix for you setup is:

in cm_cart_shipping_estimator.php

line 249:

        		if( isset($selected_quote[0]['error']) || !tep_not_null($selected_quote[0]['methods'][0]['cost']) ) {

change to:

        		if( isset($selected_quote[0]['error'])) {

Please confirm. I have to do some more testing to be sure this change doesn't mess up other things.

Then I'll include it in the next update.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hi

 

Many Thanks tried that code edit the shipping estimator disappeared and messed up my sites admin sadly , tried that free shipping mod yesterday and again the estimator vanished.

 

Many Thanks


Using Bootstrap 8-)

Share this post


Link to post
Share on other sites

@@jamo32,

 

I tried this change in my demo store and it works.

There is not any reason why it should mess up somethign in your Admin.

I post my modified module, please try.

All your removed code is there, just compare.

Edited by raiwa

Share this post


Link to post
Share on other sites

 

Thanks Rainer....I like it and plan to install it.

 

Dan

Share this post


Link to post
Share on other sites

@@raiwa

 

Hi Rainer...I took a few minutes to install the addon and while I like what I see, it doesn't seem to work well with the MZMT shipping module...it loads the default rates okay but doesn't seem to update them when you select a new state/province.  Do you happen to know if it should work with that module or not?

 

Dan

Share this post


Link to post
Share on other sites

Hello Dan @@Dan Cole,

 

I didn't try with this specific module myself, but the bug which existed for shipping mudules using state/province should be fixed in the latest version 2.4.8 uploaded 28 of March.

If you are using 2.4.8 and it still doesn't work, please upload or PM your shipping module files and your setup and I'll give it a try.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

 

Hi Rainer

 

I feel a bit embarrassed to ask you this but I seem to have one of these "Ich kann vor lauter Bäume den Wald nicht mehr sehen" days.

In the Order Total Estimate part bottom-right how can I remove those damn () next to the shipping name?

I removed them for the normal checkout process by amending the checkout_shipping.php but that seem to have no effect on the estimator.

Any ideas where I could look?

 

Thanks

Share this post


Link to post
Share on other sites

@@Tsimi,

 

Did you check your birthday in your passport? This sometimes can explain things, at least in my case :) :) :)

 

It's here '('.$quotes[$i]['methods'][0]['title'].'):

        					if ( $selected_shipping['id'] == $thisquoteid) {
        						$ShipTxt.='<tr class="success"><td onclick="return shipincart_submit(\''.$thisquoteid.'\');">' . tep_draw_radio_field('', true, true) . '<a href="_" title="' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_SELECT_THIS_METHOD .'"> <strong>' . $quotes[$i]['module'] . ' ';
        						$ShipTxt.= '('.$quotes[$i]['methods'][0]['title'].')</strong>   </a></td><td class="text-right"><strong>' . $currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], ((!empty($quotes[$i]['tax']))? $quotes[$i]['tax'] : null ))) . '</strong></td></tr>';
        					} else {
        						$ShipTxt .= '<tr><td onclick="return shipincart_submit(\''.$thisquoteid.'\');">' . tep_draw_radio_field('', false, false) . '<a href="_" title="' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_SELECT_THIS_METHOD . '"> ' . $quotes[$i]['module'] . ' ';
        						$ShipTxt .= '(' . $quotes[$i]['methods'][0]['title'] . ')   </a></td><td class="text-right">' . $currencies->format(tep_add_tax($quotes[$i]['methods'][0]['cost'], ((!empty($quotes[$i]['tax']))? $quotes[$i]['tax'] : null ))) . '</td></tr>';
        					}

and here '(' . $quotes[$i]['methods'][$j]['title'] . '):

		          				if ( $selected_shipping['id'] == $thisquoteid ) {
		          					$ShipTxt .= '<tr class="success"><td onclick="return shipincart_submit(\''.$thisquoteid.'\');"><a href="_" title="' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_SELECT_THIS_METHOD .'">' . tep_draw_radio_field('', true, true) . ' <strong>'.$quotes[$i]['module'] . ' ';
		          					$ShipTxt .= '(' . $quotes[$i]['methods'][$j]['title'] . ')</strong>   </a></td><td class="text-right"><strong>' . $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . '</strong></td></tr>';
		          				} else {
		          					$ShipTxt .='<tr><td onclick="return shipincart_submit(\''.$thisquoteid.'\');"><a href="_" title="' . MODULE_CONTENT_CART_SHIPPING_ESTIMATOR_SELECT_THIS_METHOD . '">' . tep_draw_radio_field('', false, false) . $quotes[$i]['module'] . ' ';
		          					$ShipTxt .= '(' . $quotes[$i]['methods'][$j]['title'] . ')   </a></td><td class="text-right">' . $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . '</td></tr>';
		          				}

rgds

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa

 

 

Did you check your birthday in your passport? This sometimes can explain things, at least in my case

Hehehe...yeah I thought it might be my age. :D

I have of course removed those already. :P

 

I have also removed them inside the checkout_shipping.php

'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),

to

'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . '' . $quote[0]['methods'][0]['title'] . ''),

but no luck.

Is there any other place that might generate those brackets? Besides the module file and checkout_shipping.php

Edited by Tsimi

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

×