fabriceunko Posted June 30, 2015 Share Posted June 30, 2015 I wanted to add a box to the right, so I made It would be very similar, actually. In main.php, find: <div class="row {$SECTION_NAME}_wrapper"> <div class="small-12 large-9 columns small-collapse"> {include file='templates/box.errors.php'} {include file='templates/box.progress.php'} {$PAGE_CONTENT} </div> <div class="large-3 columns show-for-large-up"> {include file='templates/box.featured.php'} {include file='templates/box.popular.php'} {include file='templates/box.sale_items.php'} </div> <a href="#" class="back-to-top"><i class="fa fa-angle-up"></i> {$LANG.common.top}</a> </div>The second nested div block -- "large-3" -- has a series of includes. Add another: {include file='templates/box.port.php'} and the box.port.php I file<div class="panel" id="box-port"> <h3>frais de port</h3> <canvas height="225" id="offert" onclick="this.focus();" oncontextmenu="return false;" style="outline: none" width="225"> </canvas> <script type="text/javascript" src="http://www.santonspeyroncampagna.com/boutique/santons-de-provence/peyron-campagna/fraisdeport/offert/offert.js"> </div> but when I checked the operation, my footer disappeared and the image that should appear company does not appear. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 30, 2015 Share Posted June 30, 2015 I do not see the closing </script> tag. Quote Link to comment Share on other sites More sharing options...
fabriceunko Posted June 30, 2015 Author Share Posted June 30, 2015 I do not see the closing </script> tag.Hello, I change my box.port.php file as below<div class="panel" id="box-port"> <h3>frais de port</h3> <canvas height="225" id="offert" onclick="this.focus();" oncontextmenu="return false;" style="outline: none" width="225"> </canvas> <script type="text/javascript" src="http://www.santonspeyroncampagna.com/boutique/santons-de-provence/peyron-campagna/fraisdeport/offert/offert.js"> </div> </script>but now my whole page went black. over my image in the new box Appear when I'm in a category. but not on the welcome pagesee screenshot belowcategory Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 30, 2015 Share Posted June 30, 2015 Try closing the script, then the div. I think it's now a nesting issue. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 30, 2015 Share Posted June 30, 2015 For the box code, try:<div class="panel" id="box-port"> <h3>frais de port</h3> <canvas height="225" id="offert" onclick="this.focus();" oncontextmenu="return false;" style="outline: none" width="225"></canvas> <script type="text/javascript" src="http://www.santonspeyroncampagna.com/boutique/santons-de-provence/peyron-campagna/fraisdeport/offert/offert.js"></script> </div> Your latest edit has put the closing </script> tag in the wrong place. Quote Link to comment Share on other sites More sharing options...
fabriceunko Posted June 30, 2015 Author Share Posted June 30, 2015 (edited) thank you thanks to you I have found my normal page. by against the picture still does not Appear in the box on the page by hosts against it workswhen I go in categories Edited June 30, 2015 by fabriceunko Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 30, 2015 Share Posted June 30, 2015 Homepage or Category -- should not make a difference.Can we have a web address where we can see this? Quote Link to comment Share on other sites More sharing options...
fabriceunko Posted July 1, 2015 Author Share Posted July 1, 2015 Hello, you can see the problem at this address.http://www.santonspeyroncampagna.com/boutique/santons-de-provence/peyron-campagna/index.php the image that should appear in the box is the one that is at the bottom of the screen on top of the latest products Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 1, 2015 Share Posted July 1, 2015 This is my guess: Also on the Homepage, you have a <canvas id="offert"> as part of the Homepage document. The "frais de port" box has <canvas id="offert">.In many cases, javascript is not coded to control more than one item with the same ID.So, for the side box, use <canvas id="side_offert"> and for the javascript file, /fraisdeport/offert/side_offert.js, code it to use var a=document.getElementById("side_offert"). Quote Link to comment Share on other sites More sharing options...
fabriceunko Posted July 1, 2015 Author Share Posted July 1, 2015 hello, I am very beginner and I do not understand where I should put the line below var a=document.getElementById("side_offert"). Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 1, 2015 Share Posted July 1, 2015 Open this file for editing: /fraisdeport/offert/offert.jsNear the beginning, there are two places where you will find document.getElementById("offert")Change offert to side_offert in both places. Save the file as /fraisdeport/offert/side_offert.jsYou may wish to ask for assistance from the authors of this javascript canvas code. Quote Link to comment Share on other sites More sharing options...
fabriceunko Posted July 2, 2015 Author Share Posted July 2, 2015 perfect. you can put resolved. thank you again for your help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.