Share via E-Mail
Share on Twitter
Share on Facebook
E-junkie Blog
E-junkie FaceBook Page
E-junkie @ Twitter

E-junkie Ecommerce Forums » E-junkie Discussions

Tag Cloud for this topic:

Button Code Questions...



UnknownArtifact
member
Posts: 5


Hello,

My apologies if these questions are redundant or misguided... I'm a new user.

1.) Is there an unpacked version of box.js that we can study?

2.) Is the following snippet of code required? This click handler does not appear to be called. Maybe because possibly it's defined in box.js? I see a reference to EJEJC_lc in box.js but it's obfuscated in the packed code.

<script type="text/javascript">// <![CDATA[
function EJEJC_lc(th) { return false; }
// ]]></script>

3.) Is the 'javascript:' reference in the OnClick handlers necessary? Should/could it be 'return EJEJC_cl(this)' rather than 'javascript:return EJEJC_lc(this)'? I've seen this used in HREF attributes but not in inline OnClick handlers. It doesn't appear to hurt anything but I'm wondering if there is any historical need for it, or something. More curious than anything.

Thank you for your time.

Regards,
CJ


#
POSTED ON: August 5, 2010 @ 13:52 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4349


Addressing your inquiries in order:

1) Sorry, we do not have a version of our script source available for public release or examination. If you're just curious about the HTML/CSS/DOM structure of the cart overlay itself, you can open an Add to Cart button's href= URL in its own tab and then view source, or view the cart overlay inside your page and use the View Source Chart extension for Firefox to examine how our cart code has been dynamically added to the end of your page's original source.

2) That part of our View Cart code is intended to suppress the cart overlay from appearing immediately upon page load in some circumstances. It should appear in your page source before the line calling our box.js script; if it appears after the box.js line, it would suppress the cart overlay from appearing at all. If the cart overlay doesn't appear in your page as soon as the page loads, you can probably do without the function EJEJC_lc(th), but it doesn't harm anything either, so you might as well keep it just in case it becomes relevant at some later point in time.

3) The onClick="javascript:..." accounts for the fact that we have no control over the page context where our button codes may be placed. Although most modern browsers assume scripts are javascript unless specified otherwise, some buyers may be using really old or weird browsers that don't assume that, and we can't safely assume javascript will always be the default script language for a page, e.g. if a seller's page declares its default script type with <meta http-equiv="Content-Script-Type" content="text/vbscript"> then the javascript: in our onClick handler would be necessary to override that.


#
POSTED ON: August 8, 2010 @ 15:29 GMT -7




UnknownArtifact
member
Posts: 5


Thank you for taking the time to answer my questions. I'm quite pleased with the E-Junkie shopping cart solution thus far. If interested, the following are rough notes on how I integrated the shopping cart into WordPress. Suggestions and feedback are always welcome.

http://unknownartifact.com/website/adding-an-e-junkie-shopping-cart- to-wordpress/

Thanks again!

Regards,
CJ


#
POSTED ON: August 9, 2010 @ 09:41 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4349


You may be interested to know that one of our clients has recently released an E-junkie WordPress plugin that automatically inserts our View Cart script lines properly and generates E-junkie cart button codes for you:
http://wpejunkie.com/

That said, rest assured we're still quite glad to see your own, detailed guide to a more "manual" implementation, as that should come in handy for WP users who either can't or don't want to use the WP E-junkie plugin, or who may have customization requirements that couldn't be done with the plugin's default cart script and button codes. In fact, I've added a link to your guide in the WordPress section of our Sites/Blogs help page. :^)


#
POSTED ON: August 9, 2010 @ 15:31 GMT -7


You must be logged in to make a post. Please click here to login.

30 Day Money Back Guarantee
PayPal Certified Integration
Google Checkout Certified Integration
Slam the Online Scam