Posted - 02/11/2020 : 15:22:48
Hi, We updated to 7.1.8 yesterday and our Add to Cart button results in nothing being added to the cart. It worked before the update.
Here is the PHP: <?php session_cache_limiter('none'); session_start(); ob_start(); ?> <?php $GLOBALS['ectcartpage']='proddetail'; $GLOBALS['showinstock']=FALSE; //****************************** //Changed on Mon Mar 6 to prevent need for ECT Core Update Plugin Which Has Been Deleted //require('./wp-blog-header.php'); //get_header(); require('./wp-config.php'); $wp->init(); $wp->parse_request(); $wp->query_posts(); $wp->register_globals(); get_header(); //**************************** ?> <div id="main-content" class="main-content"> <div id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <div class="entry-content"> <h1 class="entry-title"><?php echo get_the_title($post); ?></h1> <?php $explicitid = "MSC-144"; include "vsadmin/inc/incproddetail.php"; ?> <?php // Start the Loop. while ( have_posts() ) : the_post(); do_action( 'storefront_page_before' ); // Include the page content template. //get_template_part( 'content', 'page' ); // Commented out the standard theme content area echo "<br /><br />"; // Just the content, not the title, since that's needed above the ECT store code the_content(); do_action( 'storefront_page_after' ); ;
endwhile; ?> </div><!-- #entry-content --> </div> </div><!-- #content --> </div><!-- #primary --> <?php do_action( 'storefront_sidebar' ); get_footer();
----------------------------------
and the resulting HTML around the Add to Cart button
-----------
<div id="mainbodyspan" class="proddetail MSC-144" itemscope itemtype="http://schema.org/Product"><form method="post" id="ectform0" action="cart.php" onsubmit="return formvalidator0(this)" style="margin:0px;padding:0px;"><script type="text/javascript">/* <![CDATA[ */sz('MSC-144',20,0,'',983892);function setvals0(){ optacpc[0]='';optmaxc[0]=0;opttype[0]=3;optperc[0]=false; } function updateprice0(){ setvals0();updateprice(1,0,20,0,'MSC-144',0,false,true,false);} function formvalidator0(theForm){ setvals0();return(ectvalidate(theForm,1,0,false,false));} /* ]]> */</script><input type="hidden" name="id" value="MSC-144" /> <input type="hidden" name="mode" value="add" /> <div class="prodnavigation detailprodnavigation"><a class="ectlink" href="../">Home</a> » <a class="ectlink" href="products.php?cat=4">MISC</a></div><div class="checkoutbutton detailcheckoutbutton"> <input type="button" value="Checkout" class="ectbutton checkoutbutton detailcheckoutbutton" onclick="ectgonoabs('cart.php')" /></div><div class="detailid"><span class="prodidlabel detailidlabel">Product ID</span> <span itemprop="productID">MSC-144</span></div><div class="detailname"><span itemprop="name">Extended Service Area Payment - Ken</span></div><div class="detaildescription" itemprop="description"><br><br><p>After you have scheduled your session(s) with your trainer, please pay the extended service area travel fee for each session. For example, if you have scheduled 3 private sessions, then increase the Quantity to 3.</p></div><div class="detailprice" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="USD"><strong>Price:</strong> <span class="price" id="pricediv0" itemprop="price" content="20.00">$20.00</span> </div><div class="detailquantity"><div class="detailquantitytext">Quantity:</div><div class="quantity0div detailquantity0div"><input type="text" name="quant" id="w0quant" size="2" maxlength="5" value="1" title="Quantity" class="quantity0input detailquantity0input"></div> </div><div class="detailoptions"><div class="ectoptioncontainer ecttextoption"><div class="optiontext detailoptiontext"><span class="detailoption"><label for="optn0x0">Extended Service Area Private Training Session</label></span></div><div class="option detailoption"> <input data-optgroup="184" type="hidden" name="optn0" value="978" /><textarea data-optgroup="184" class="prodoption detailprodoption" name="voptn0" id="optn0x0" cols="30" rows="5">Please list the dates of the session(s) that you are paying the travel fee for.</textarea></div></div></div><div class="addtocart detailaddtocart"><input type="submit" value="Add to cart" class="ectbutton buybutton detailbuybutton" /></div></form></div><script type="text/javascript">updateprice0();</script> <br /><br />
Jill Olkoski Small Business Website Design Aldebaran Web Design, Seattle WA AldebaranWebDesign.com
|