Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Need help adding script to shopping cart page

Need help adding script to shopping cart page

Views: 1,027

Results 1 to 12 of 12
7 Aug 2013, 4:15 PM
#1
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Need help adding script to shopping cart page

Hello,

I am trying to add the following to the shopping cart page...

<script type="text/javascript" data-pp-pubid="30175f551d" data-pp-placementtype="468x60"> (function (d, t) { "use strict"; var s = d.getElementsByTagName(t)[0], n = d.createElement(t); n.src = "//paypal.adtag.where.com/merchant.js"; s.parentNode.insertBefore(n, s); }(document, "script")); </script>

which will produce this banner Attachment 12861 to the shopping cart page. I would love to be able to place it here... Attachment 12863

Any help would be great!

8 Aug 2013, 5:47 PM
#2
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Need help adding script to shopping cart page

Hmmm... No one on this huh? :huh: Any help would be great!

8 Aug 2013, 5:51 PM
#3
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Need help adding script to shopping cart page

doooomed:

Hmmm... No one on this huh? :huh: Any help would be great!

Could add it to
/includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart_default.php

before:

<?php if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1') { ?>
9 Aug 2013, 12:18 PM
#4
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Need help adding script to shopping cart page

Thank you rharbour! I moved the code around a bit and this is what I have...

Attachment 12869

I can't seem to get the top to align with the back to shopping/go to checkout buttons. I'd also like to move the banner a little to the right...Thanks!

9 Aug 2013, 1:49 PM
#5
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Need help adding script to shopping cart page

doooomed:

Thank you rharbour! I moved the code around a bit and this is what I have...

I can't seem to get the top to align with the back to shopping/go to checkout buttons. I'd also like to move the banner a little to the right...Thanks!

Those will more than likely be simple css changes, but without seeing the live site it will be hard to advise.

9 Aug 2013, 2:11 PM
#6
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Need help adding script to shopping cart page

d0000med.com replace the zero's with o's

9 Aug 2013, 3:05 PM
#7
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Need help adding script to shopping cart page

css looks ok, try removing the

<br class="clearBoth" />

before the banner

9 Aug 2013, 4:27 PM
#8
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Need help adding script to shopping cart page

The only thing that seems to change when removing <br class="clearBoth" /> is the position of the "check out with Paypal" button. See this picture...

Attachment 12870

The Paypal button is normally like this...

Attachment 12871

9 Aug 2013, 5:07 PM
#9
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Need help adding script to shopping cart page

Your site looks different on my laptop, the shopping cart page does not have that huge gap

this is the code to position the banner if that is what you want, I do not suggest doing so

.centerColumn > center > span > a > img {
position:relative;
top:-50px;
left:0px;
right:0px;}

adjust px as you see fit

9 Aug 2013, 5:33 PM
#10
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Need help adding script to shopping cart page

Hi again,

What huge gap are you referring to? Also what browser? I'm curious why it looks different for you. Why do you suggest I do not use the code? Thanks for all the help!

9 Aug 2013, 8:01 PM
#11
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Need help adding script to shopping cart page

doooomed:

Hi again,

What huge gap are you referring to? Also what browser? I'm curious why it looks different for you. Why do you suggest I do not use the code? Thanks for all the help!

See the differences, I do not have the room to place banner in the middle of "back to shopping" and "checkout" buttons like your image appears. I use the latest, FF, IE, Chrome and Opera, all show the same in my browsers on both my laptop and tablet. Can not check desktop for I am away from sandbox.

Using the code will force it between those buttons, and will most likely overlap on smaller browsers.

[Attachment no longer available]

Just MO and someone else may see a different way to adjust.

10 Aug 2013, 11:18 AM
#12
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Need help adding script to shopping cart page

Thank you for all the help rbarbour, it is appreciated!

I'm gonna go ahead and ditch this effort and try another approach as I really don't like the way it looks on your end and would hate for my customers to experience that.