Jump to content
ednique

[Contribution] Ship In Cart

Recommended Posts

Suggested fix (not tested, so don't shoot me) -- in /shopping_cart.php find this line

<div class="row">

and replace it with

<div class="row vertical-align">

Now add this to your user.css:

.vertical-align {
    display: flex;
    align-items: top;
}

Please let us know if that helps. Or blows up spectacularly.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@Dan Cole  A suggestion to add to all of the modules -- we need some way to target an individual module (or some part of one) with CSS. I suggest giving the outer div on every module a unique ID. Setting the ID to the filename should work. so, in the Order Subtotal module, change this

<div class="col-sm-<?php echo $content_width ?>">

to this

<div id="cm_sc_order_subtotal" class="col-sm-<?php echo $content_width ?>">

The trick in my previous post might also be a good addition, provided that it works.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@kymation Good idea Jim and that is actually in one of the modules but not all of them.   Another idea for the next update.

 

I want to see if it "blows up spectacularly" though. (w00t)

 

Dan

Share this post


Link to post
Share on other sites

@@Dan Cole  You can see exactly that if you try my code. In its defense, it does align everything to the top. Everything. All of the modules, all on one line. I'd post a screenshot, but this forum won't let me. You'll just have to test it yourself.

 

Back to the drawing board.

 

Regards

Jim

 

 


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@kymation If someone doesn't jump in overnight I'll get the add-on modules installed so I can get a better feel for the issue.  I'm sure I don't have any of the latest modules in place but at least it should be easy to do so now.  :)

 

It "blows up spectacularly" and we don't have a screenshot? 

 

Dan   

Share this post


Link to post
Share on other sites

@@kymation

 

Jim, check your attachments section in your profile. You might have reached your 2MB limit. I had similar issues recently, couldn't upload packages or images because of it.

Share this post


Link to post
Share on other sites

@@Tsimi  I have only used 5% of my quota, and the screenshot I was trying to add is small enough.
 
@@Dan Cole  I may not be able to add an image, but I can add a link. Go ahead and laugh.

 

I've tried a few other tricks for vertical alignment, but nothing works. I think I can make it work by adding unique IDs to the modules, then targeting those with the CSS. I'll let you know if/when I come up with something. If somebody else can come up with something that works, that would be awesome.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Now I feel stupid. Look in includes/modules/content/shopping_cart/cm_sc_order_total.php and you'll see this line:

		    		$sc_order_total = 	'<br><br>';

Remove those two breaks and the module magically lines up. No CSS tricks needed.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@@kymation,

 

Yes, sure these <br> were left over from the old module, thought I had them removed, but removed it only from the shipping module.

Sorry for all the mess.

Fix is uploaded.

Share this post


Link to post
Share on other sites

@@kymation

 

I may not be able to add an image, but I can add a link. Go ahead and laugh.

 

That's pretty good and a lot better than the blank page or error message I usually end up with.  :x  Thanks for sharing.  :lol: :lol:

 

Dan

Share this post


Link to post
Share on other sites

@@Dan Cole and others,

 

Here the 2-3 page checkout for testing:

 

Not a full package:

 

1. uninstall "Checkout" shopping cart module

2. upload and replace the 2 included modules: cm_sc_checkout.php and cm_sc_shipping.php

3. In: checkout shipping.php at the top below

  require('includes/application_top.php');
  require('includes/classes/http_client.php');

Add:

// Ship in Cart Begin
if (defined('MODULE_CONTENT_SC_CHECKOUT_STATUS') && defined('MODULE_CONTENT_SC_CHECKOUT_LINK') && MODULE_CONTENT_SC_CHECKOUT_LINK != 'checkout_shipping.php' ) tep_redirect(tep_href_link('shopping_cart.php', '', 'SSL'));
// Ship in Cart End

4. Install again "Checkout" shopping cart module.

5. Select: Checkout button Link => checkout_payment.php

 

Please Test

 

 

regards

Rainer

Share this post


Link to post
Share on other sites

@@Dan Cole and others,

 

Here the 2-3 page checkout for testing:

 

Not a full package:

 

1. uninstall "Checkout" shopping cart module

2. upload and replace the 2 included modules: cm_sc_checkout.php and cm_sc_shipping.php

3. In: checkout shipping.php at the top below

  require('includes/application_top.php');
  require('includes/classes/http_client.php');

Add:

// Ship in Cart Begin
if (defined('MODULE_CONTENT_SC_CHECKOUT_STATUS') && defined('MODULE_CONTENT_SC_CHECKOUT_LINK') && MODULE_CONTENT_SC_CHECKOUT_LINK != 'checkout_shipping.php' ) tep_redirect(tep_href_link('shopping_cart.php', '', 'SSL'));
// Ship in Cart End

4. Install again "Checkout" shopping cart module.

5. Select: Checkout button Link => checkout_payment.php

 

Please Test

attachicon.gifShip In Cart BS reloaded v3.1.zip

 

regards

Rainer

 

Installed 4. Install again "Checkout" shopping cart module.

What about MODULE_CONTENT_SC_SHIPPING_TITLE


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

Installed 4. Install again "Checkout" shopping cart module.

What about MODULE_CONTENT_SC_SHIPPING_TITLE

 

@@altoid,

 

Sorry, I don't understand, the shipping module doesn't need to be uninstalled and reinstalled, just replaced. there is no new configuration entry.

Do you get any error for: MODULE_CONTENT_SC_SHIPPING_TITLE ?

 

Or do you not have the original ship in cart add-on installed? It's supposed you have.

Edited by raiwa

Share this post


Link to post
Share on other sites

@@altoid,

 

Sorry, I don't understand, the shipping module doesn't need to be uninstalled and reinstalled, just replaced. there is no new configuration entry.

Do you get any error for: MODULE_CONTENT_SC_SHIPPING_TITLE ?

 

Or do you not have the original ship in cart add-on installed? It's supposed you have.

 

Do not have the ship in cart installed on the uniserver.  I'll work on this.


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites
Here the 2-3 page checkout for testing:

 

@@raiwa

 

I might be a little while getting to this....I've been ducting my wife's "honey do list" for a couple of days now but I don't think I can avoid it any longer.

 

Dan

Share this post


Link to post
Share on other sites

@@raiwa @@Dan Cole May want to hold off a bit on testing as Gary is redoing some of the shopping cart module package over in Github. Specifically, includes/modules/content/shopping_cart/cm_sc_checkout.php


I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Share this post


Link to post
Share on other sites

@@raiwa  Rainer I was attempting to install Lambros's Discount Coupon module and realized he uses a different discount coupon addon than I do.  For several reasons I want to keep the one I'm using and thought I might work up a content module for it.  As I was thinking about that I got to wondering about the impact on your order total module and whether it would be compatible with other discount coupons modules or if it was tweaked to just work with one Lambros developed?

 

Dan

Share this post


Link to post
Share on other sites

Hello Dan @@Dan Cole,

 

The order total module is coded like the order total section in checkout confirmation.

My module should work with all add-ons which work with the order totals on that page.

You only need to add an update button or script to update the shopping cart page and the order totals once the discount code has been introduced. Just submit the form and reload the page should do it, like Lambros does in his module.

 

However I remember that there was one discount coupon add-on which doesn't work with PayPal express. Nothing specific with the PayPal express checkout button on the shopping cart page. It neither works with PayPal express on the standard checkout payment page. It just doesn't pass the discount amount to PayPal.

So if this one is yours, it may not be worth to develop a new module for it.

 

rgds

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa Thanks Rainer....judging from your code I thought that might be the case.  You might be right about the PayPal Express issue but as I recall there is a very simple fix for it that has been floating around the forums for years.   Not sure if it got in the new app though so I'll watch for that.

 

Thanks again...

 

Dan 

Share this post


Link to post
Share on other sites

@@Dan Cole,

 

There was a fix (one of my add-ons) for the old paypal express modules, adding code to it and it was needed for all discount add-ons.

But for the latest PayPal express modules vers.3.x and the one included in PayPal App, this shouldn't be needed and is not good practice, I believe. Standard compliant coded add-ons do not need to touch the payment modules.

It's for the new modules where that add-on doesn't pass info to PayPal.

 

If the fix you refer to is a different one and does the fix in the discount ot, of course it's another thing and ok.

Edited by raiwa

Share this post


Link to post
Share on other sites

@@Dan Cole,

 

There was a fix (one of my add-ons) for the old paypal express modules, adding code to it and it was needed for all discount add-ons.

But for the latest PayPal express modules vers.3.x and the one included in PayPal App, this shouldn't be needed and is not good practice, I believe. Standard compliant coded add-ons do not need to touch the payment modules.

It's for the new modules where that add-on doesn't pass info to PayPal.

 

If the fix you refer to is a different one and does the fix in the discount ot, of course it's another thing and ok.

 

I think Lambros is correct and I use the same add-on as Scott @greasemonkey,  If he is using the new app and PayPal Express maybe he'll chime in.

 

Dan

Share this post


Link to post
Share on other sites

@@Dan Cole,

 

Definitive no, I changed the discount coupon Scott is using in his store to Tsimis add-on (ok it was still the old version before Tsimi bootstrapped it), for exact the reason that it didn't work with the new PayPal modules. I modified it adding the features he used in the old one like shipping discount and others.

Edited by raiwa

Share this post


Link to post
Share on other sites

Thanks Rainer...sounds like you saved be a lot of grief...it's a good discount module and works with programs like MailBeezs so it's too bad it wouldn't work with the new APP or couldn't be modified to do so.

 

Dan

Share this post


Link to post
Share on other sites

This gets stranger....I don't have PayPal Express installed but I do use the APP with PayPal Standard and it recognizes the correct order amount after a discount coupon is applied...just tested it.  I'm surprised it doesn't work with PayPal Express when it works with PayPal Standard.   I think I'll push forward with a new content module using the discount coupon add on that I use.  Maybe there was something different about the one I use versus the one Scott was using or that there is a bug in the APPs PayPal Express module .  I have my fingers crossed. I'd really like to have the ability to enter a coupon on the shopping cart page without forcing the customer to login.

 

Dan

Share this post


Link to post
Share on other sites

Dan @@Dan Cole,

 

 

.I don't have PayPal Express installed but I do use the APP with PayPal Standard and it recognizes the correct order amount after a discount coupon is applied...just tested it.  I'm surprised it doesn't work with PayPal Express when it works with PayPal Standard.

 

I know that it works with PayPal standard. It was just the reason we changed to tsimis discount add-on. Before, Scott used PayPal standard and it worked with his discount add-on. Then he wanted to change to PayPal express and his discount add-on didn't worked with that.

PayPal standard and express work very different.

 

 

 Maybe there was something different about the one I use versus the one Scott was using

 

If you post the download Url of your discount add-on I can tell you if it's the same or not.

 

 

or that there is a bug in the APPs PayPal Express module .

 

If all other third party discount add-ons work with PayPal express (at least all I tried out) and that one doesn't, it looks more that the problem is in the discount add-on.

Beside that I have to believe the developer of the PayPal express module knows what he does :-

 

The PayPal express doc says:

Line Items
Each product that is ordered is passed on to PayPal as line items to show to the customer during the Express Checkout flow. This includes extra third-party Order Total modules that manipulate the order total values (eg, discounts). In rare occassions, when the line items, shipping, and tax calculations do not match the order total value, only the order total value is passed onto PayPal without the line items

 

Dan, if even the total is not correct passed to PayPal express the third party ot module isn't correct coded.

 

I understand of course that you wish to keep your discount add-on and have a module for the shopping cart in your store.

I just wanted to express that it may not be worth to develop and pack it as an add-on knowing that it will not work with PayPal express which is just the option in the shopping cart where it would be usefull.

Only the alternative PayPal express chekout button in the shopping cart allows to checkout guests.

 

Also if there are several add-ons available which do almost the same, I believe it would make more sense to promote the one which is standard compliant, works flawless with PayPal express and other external payment modules.

Maybe it would be better to encourage and offer help to Tsimi to improve his add-on.

For example to add missing options like shipping discount and an optional setting to allow not logged in users to use it with discount codes which are not linked to a customer.

 

These are just my thoughts, you can of course do what you like in your store.

 

rgds

Rainer

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

×