1 / 12
Apr 2013

I'm rewriting my sales page and have copied the code for the add to cart button to a new test page.



Thanks to another post, I think I'm missing the 'script source' portion of the code. But I don't know where to get that or where to put it.



I've tried several experiements but nothing's worked so far. Help?

  • created

    Apr '13
  • last reply

    Apr '13
  • 11

    replies

  • 1.5k

    views

  • 2

    users

  • 9

    links

OK, I just tried something that worked. I did view source and found some code, pasted it into the html view of my page. Box DOES pop up, yay!



But it has a scrollbar on the right hand side.



When I try this on the original page, there's no scrollbar and the content of the box fits perfectly.

Could you provide a link to your page where this is happening, so we could have a look at what might be going on there?

Hm, that page did not come up for me; if that is a page-editing screen, only you can access that, so we'd need to see the actual published page that's live on your site. Also, note that testing cart buttons in your page-editing screen may not work right, but should work fine when the page is published to your live site.



I tested the cart buttons on all 4 of your training-guides sales pages and found the cart looked and worked fine there. Note that since the overlay-style cart is a fixed size, if a buyer adds 5 different items or more to their cart, that would make the cart larger than the overlay window can contain, so in that case a scrollbar would appear.

Taking your last question first, the top Add to Cart button on that page is missing the onclick="javascript:return EJEJC_lc(this);" attribute included in our standard button code; that tells the button to display the overlay-style cart "inside" your page. With your custom button image, that product's code should look like this:



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=1042595&cl=157086&ejc=2" onclick="javascript:return EJEJClc(this);" class="ec_ejc_thkbx" target="ej_ejc"><img class="aligncenter" alt="Add To Cart - Button Red" src="http://www.frxbuzz.com/wp-content/uploads/2013/04/addtocart-red2.png" width="164" height="73" /></a>



The top of this help page explains our recommended method for modifying your standard button code to replace our regular button image with a custom button graphic:

http://www.e-junkie.com/ej/help.custom.purchase-buttons.htm



The problem with your cart display having everything spaced so far apart, causing the scrollbar to appear, is a bit trickier to explain and fix. When the overlay-style cart displays inside your page, it works as a part of that page and thus inherits CSS layout code from that page, so the cart layout is being thrown off by your WordPress theme (which is largely built in CSS).



If you're not handy with modifying CSS code, the simplest approach may be simply trying a different theme until you find one that doesn't mess up the cart. If you want to try fixing the problem with your current theme, try adding these lines to the end of your site's http://www.frxbuzz.com/wp-content/themes/thesis185/custom/custom.css file:



.custom #ejejctable {

line-height: 1.0em;

}



BTW, we respond to all support inquiries within 24 hours or less, usually same-day during weekday business hours. :^)

Thanks! I'll check it all out. I can add code to the custom.css but can't really write it :slight_smile:

I haven't done the css yet, but the first and most important fix is done! Thanks!