The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

My points store not working!

View previous topic View next topic Go down

My points store not working!

Post by Zuke on August 20th 2015, 12:00 am

Hello, well today I've found a code from PunBB.biz about a points store. When I tried it, it's not functioning like it should. When I click buy, nothing happens...

MY CODE:

Code:
<style type="text/css">
  .header {
  margin-top: 25px;
  background: #0099ff;
  font-size: 25px;
  color: white;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #0099ff;
  border-radius: 1px;
  text-align: center;
  }
 
  /.shopWrapper {
  text-align: center;
  margin: 0 auto;
  border: 3px dashed/ #0000ff;
  overflow: hidden;
  height: auto;
  background: whiteSmoke;
  }
 
  .title {
  font-weight: bold;
  font-size: 12px;
  color: #303030;
  margin: 5px;
  }
 
  .image img {
  padding-top: 13px;
  max-width: 174px;
  max-height: 202px;
  }
 
  .image {
  text-align: center;
  }
 
  .points {
  background: url(http://s6.tinypic.com/286sfuu_th.jpg) no-repeat;
  padding-bottom: 5px;
  padding-left: 18px;
  color: #242424;
  font-weight: bold;
  font-size: 11px;
  float: left;
  text-align: center;
  }
 
  .sale {
  color: green;
  font-style: italic;
  font-size: 11px;
  float: right;
  text-align: center;
  }
 
  .item {
  width: 188px;
  min-height: 335px;
  border: 1px solid #CECECE;
  overflow: hidden;
  height: auto;
  padding: 5px;
  background: #fff;
  text-align: center;
  }
 
  .descrip {
  float: left;
  margin-left: -10px;
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 5px;
  padding-bottom: 5px;
  background: #E9E9E9;
  border: 1px solid #CECECE;
  border-left: 0;
  width: 92.3%;
  text-align: left;
  margin-top: 30px;
  margin-bottom: 5px;
  }
 
  .description {
  color: #242424;
  font-size: 11px;
  word-wrap: break-word;
  text-align: left !important;
  float: left;
  text-indent: 11px;
  }
 
  .itemWrapper {
  text-align: center;
  margin: 0 auto;
  float: left;
  }
 
  .inventWrapper {
  float: left;
  width: 815px;
  height: auto;
  overflow: hidden;
  }
 
  .cart {
  overflow: hidden;
  background: white;
  }
 
  .cart_title {
  text-align: center;
  color: #000;
  border-bottom: 2px solid #000;
  }
 
  .cart_items {
  text-align: center;
  }
 
  .cart_body {
  text-align: center;
  margin: ;
  overflow-x: hidden;
  overflow-y: scroll;
  border: 1px solid lime;
  height: 210px;
  background: white;
  }
 
  .cartWrapper .totaler {
  bottom: 0;
  }
 
  li:hover {
  cursor: pointer;
  }
 
  #checkout {
  float: left;
  height: 130px;
  text-align: center;
  background: white;
  border-top: 2px solid #343434;
  margin-top: 5px;
  width: 100% !important;
  }
 
  input[type="button"],
  input[type="reset"],
  input[type="submit"] {
  margin-bottom: -30px;
  font-family: 'Segoe UI Web Light', 'Segoe UI Light', 'Segoe UI Web Regular', 'Segoe UI', 'Segoe UI Symbol', 'Helvetica Neue', Arial;
  font-size: 15px;
  color: black;
  border: 1px solid #cecece;
  background-color: #F3F3F3;
  padding: 4px 10px;
  -webkit-transition: all 0.3s;
  }
 
  input[type="button"]:hover,
  input[type="reset"]:hover,
  input[type="submit"]:hover {
  border: 1px solid #CECECE;
  background: #CECECE;
  box-shadow: 0 0 0px;
  }
 
  button.button1,
  button.button2,
  input.button1,
  input.button2 {
  margin: 3px;
  cursor: pointer;
  border-radius: 2px;
  font-family: 'Segoe UI Web Light', 'Segoe UI Light', 'Segoe UI Web Regular', 'Segoe UI', 'Segoe UI Symbol', 'Helvetica Neue', Arial;
  font-size: 16px;
  color: black;
  border: 1px solid #CECECE;
  background: #F3F3F3;
  padding: 15px 51px;
  -webkit-transition: all 0.3s;
  }
 
  button.button1:hover,
  button.button2:hover,
  input.button1:hover,
  input.button2:hover {
  color: white;
  border: 1px solid #A3A3A3;
  background-color: #A3A3A3;
  }
 
  .type_header {
  -webkit-box-shadow: none !important;
  margin: 0px;
  padding: 4px 10px;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  font-size: 13px;
  line-height: normal;
  font-family: Raleway,sans-serif;
  color: white;
  background-image: url(http://i47.tinypic.com/33nusqs.jpg);
  background-color: #0099ff;
  border: 1px solid #0099ff;
  border-top-right-radius: 1px;
  border-top-left-radius: 1px;
  background-position: initial initial;
  background-repeat: repeat no-repeat;
  width: 778px;
  }
</style><script type="text/javascript">
  (function($) {
  $(document).ready(function() {
  var $total = 0.0
  $('.addButton').click(function() {
  var theID = '#' + $(this).attr('data-item');
  var pointstoAdd = parseFloat($(theID).find('.points').attr('data-myprice'));
  $total += pointstoAdd;
  $('.totaler').html('Total Currencies = R$ ' + $total.toFixed(2));
  var $newItem = '<li class="cart-item" data-points="' + pointstoAdd + '">' + $(theID).find('.title').text() + '</li>';
  $('.theList').append($newItem);
  BindIt();
  });
  function BindIt() {
  $('.cart-item').unbind('click');
  $('.cart-item').click(function() {
  $total -= parseFloat($(this).attr('data-points'));
  $('.totaler').html('Total Currencies = R$ ' + $total.toFixed(2));
  $(this).remove();
  });
  }
  });
  $(document).ready(
  function() {
  $('#submitCart').click(function() {
  var text = '';
  var total = 0;
  $(".theList li").each(function() {
  var string = $(this).text();
  var points = parseInt($(this).data('points'));
  //capitalize first letter of string
  text += string.charAt(0).toUpperCase() + string.slice(1)
  //add line break at the end
  + ' = ' + points + "\n";
  total += points;
  });
  //I think calculating total is easier than trying to manipulate $(".totaler")
  text += "Total Currencies = R$ " + total;
  $("#cartMessage").text(text);
  });
  });
  })(jQuery);
</script><style>
  div.module.main.module-advert {
  display: none;
  }
 
  img,
  .input_check,
  .input_radio {
  vertical-align: middle;
  }
 
  .ipsButton_secondary img {
  vertical-align: middle;
  margin-top: -1px;
  }
 
  .ipsButton_secondary:hover {
  color: #4C4C4C;
  background-color: #F8F8F8;
  }
 
  index.phpmedia="screen, print" .input_submit,
  .ipsButton_secondary {
  outline: none;
  }
 
  .ipsButton_secondary {
  height: 24px;
  line-height: 24px;
  font-size: 11px;
  padding: 0 10px;
  background: #ECECEC url('http://i46.tinypic.com/2v0y81x.png') repeat-x 0 0;
  border: 1px solid #D0D0D0;
  -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1), inset rgba(255, 255, 255, 0.7) 0px 1px 0px;
  -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1), inset rgba(255, 255, 255, 0.7) 0px 1px 0px;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1), inset rgba(255, 255, 255, 0.7) 0px 1px 0px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  color: #616161;
  text-shadow: white 0px 1px 0px;
  display: inline-block;
  white-space: nowrap;
  cursor: pointer;
  }
 
  .ipsButton_secondary:active {
  -webkit-box-shadow: inset rgba(0, 0, 0, 0.15) 0px 1px 2px, rgba(255, 255, 255, 0.5) 0px 1px 0px;
  -moz-box-shadow: inset rgba(0, 0, 0, 0.15) 0px 1px 2px, rgba(255, 255, 255, 0.5) 0px 1px 0px;
  box-shadow: inset rgba(0, 0, 0, 0.15) 0px 1px 2px, rgba(255, 255, 255, 0.5) 0px 1px 0px;
  position: relative;
  top: 1px
  }
 
  #Doarfast {
  background: rgba(0, 0, 0, 0.6) url('http://fcimage.net/public/style_images/imgfc/trans60.png') repeat;
  box-shadow: 10px 10px 40px #000;
  color: #333;
  font-family: sans-serif;
  left: 30%;
  position: fixed;
  top: 20%;
  width: 550px;
  z-index: 999;
  padding: 8px;
  -webkit-box-shadow: rgba(0, 0, 0, 0.5) 0px 10px 20px;
  -moz-box-shadow: rgba(0, 0, 0, 0.5) 0px 10px 20px;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 10px 20px;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  }
 
  #Doarfaster {
  background-color: #3E3E3E;
  filter: Alpha(opacity=80);
  left: 0;
  min-height: 101%;
  opacity: 0.4;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  }
 
  #Doarfast h1 {
  padding: 5px;
  font-size: 12px;
  text-align: center;
  color: #727272;
  text-shadow: rgba(255, 255, 255, 0.<img src="http://illiweb.com/fa/i/smiles/icon_cool.gif" alt="Cool" longdesc="6" /> 0px 1px 0px;
  background: #EEE url('http://i46.tinypic.com/2v0y81x.png') repeat-x 0 0;
  }
 
  .Doarfast-content {
  background-color: #FCFCFC;
  border-bottom: 1px solid #EAEAEA;
  border-top: 1px solid white;
  }
 
  .Doarfast-content td {
  padding: 10px;
  padding-top: 2px;
  padding-bottom: 2px;
  border-bottom: 1px solid #EAEAEA;
  border-top: 1px solid white;
  }
 
  #Doarfast img.closebutton {
  background: url(http://i50.tinypic.com/33kqfld.png) no-repeat;
  cursor: pointer;
  float: right;
  height: 22px;
  margin: 5px;
  width: 22px
  }
 
  .pun input {
  padding: 6px;
  border: 1px solid #D4D4D4;
  background: #FCFCFC;
  color: #9F9F9F;
  text-shadow: white 0px 1px 0px;
  -webkit-box-shadow: inset rgba(0, 0, 0, 0.1) 0px 1px 3px;
  -moz-box-shadow: inset rgba(0, 0, 0, 0.1) 0px 1px 3px;
  box-shadow: inset rgba(0, 0, 0, 0.1) 0px 1px 3px;
  }
 
  .pun input:focus {
  background-color: #fefefe;
  color: #555;
  border-color: #bbb;
  -webkit-box-shadow: inset 0px 0px 4px rgba(0, 0, 0, 0.2);
  -moz-box-shadow: inset 0px 0px 4px rgba(0, 0, 0, 0.2);
  box-shadow: inset 0px 0px 4px rgba(0, 0, 0, 0.2)
  }
 
  .submit {
  padding: 15px;
  text-align: center;
  background: #EEE url('http://i46.tinypic.com/2v0y81x.png') repeat-x 0 0;
  border-top: 1px solid #CCC;
  height: 30px;
  }
</style>
<div class="header">
    <span style="font-family: Raleway,sans-serif;"><span>Ocean Credits Store</span></span>
</div>
<div class="shopWrapper">
   
   <div class="inventWrapper">
      
      <div class="type_header">
          Ocean Credits Store Items
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item1">
             <span class="title"><span style="font-family: Raleway,sans-serif;"><span>Name Color</span></span></span> <br /> <span class="image"><img src="http://i.imgur.com/so7jJ4o.png" /></span> <br />
            <div class="descrip">
                <span data-myprice="5000" class="points"><span><span>5,000 credits </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item1" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item2">
             <span class="title"><span style="font-family: Raleway,sans-serif;"><span>Verified Icon</span></span></span> <br /> <span class="image"><img src="http://i.imgur.com/mOuc8LC.png" /></span> <br />
            <div class="descrip">
                <span data-myprice="5000" class="points"><span><span>5,000 points </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item2" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item3">
             <span class="title"><span><span>25,000 Nexon Card</span></span></span> <br /> <span class="image"><img src="http://gainfreestuff.com/wp-content/uploads/2013/07/nexon.jpg" /></span> <br />
            <div class="descrip">
                <span data-myprice="15000" class="points"><span><span>15000 points </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item3" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item4">
             <span class="title"><span><span>Steam Game (50$ Vaule)</span></span></span> <br /> <span class="image"><img src="http://static.trustedreviews.com/94/000025e7f/5c9b/Steam-Logo.png" /></span> <br />
            <div class="descrip">
                <span data-myprice="10000" class="points"><span><span>10000 points </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item4" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item5">
             <span class="title"><span><span>Windows 7 UL</span></span></span> <br /> <span class="image"><img src="http://oazeek.com/wp-content/uploads/2012/05/Windows-7.png" /></span> <br />
            <div class="descrip">
                <span data-myprice="1000" class="points"><span><span>1000 points </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item5" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item6">
             <span class="title"><span><span>Minecraft</span></span></span> <br /> <span class="image"><img src="http://fc06.deviantart.net/fs70/f/2011/282/1/8/minecraft_logo_by_krouton3-d4cbzex.png" /></span> <br />
            <div class="descrip">
                <span data-myprice="1000" class="points"><span><span>1000 points </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item6" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item7">
             <span class="title"><span><span>25$ prepaid visa</span></span></span> <br /> <span class="image"><img src="https://points.rbcrewards.com/Catalogue/ProductImage?image=VisaGCLogo.jpg&width=230&height=230" /></span> <br />
            <div class="descrip">
                <span data-myprice="12000" class="points"><span><span>12000 points </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item7" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
      <div class="itemWrapper">
         
         <div class="item" id="item8">
             <span class="title"><span><span>25 PC Games</span></span></span> <br /> <span class="image"><img src="http://th09.deviantart.net/fs50/PRE/i/2009/340/1/0/Game_Aicon_Pack_32_by_HarryBana.png" /></span> <br />
            <div class="descrip">
                <span data-myprice="10000" class="points"><span><span>10000 points </span></span></span> <span class="sale"><span><span>For sale </span></span></span> <br />
            </div>
             <span><span><input value="Buy" data-item="item8" class="addButton" type="button" /></span></span>
         </div>
         
      </div>
      
   </div>
   
   <div class="cartWrapper">
      
      <div id="cartj" class="cart">
         
         <div class="cart_body">
            
            <div class="cart_title">
                <span><span style="font-family: Raleway,sans-serif;"><span>Items Selected</span></span></span>
            </div>
            
            <div class="cart_items">
               
               <ul class="theList">
                  
               </ul>
               
            </div>
            
         </div>
          <span class="totaler"><span style="font-family: Raleway,sans-serif;"><span><span>Total Credits = </span></span></span></span>
      </div>
      
      <form name="post" method="post" action="/privmsg" id="privatemessage">
          <input value="Luke" style="display:none" type="text" name="username[]" /> <input class="usernameinput" type="text" name="subject" maxlength="64" style="display:none" value="Credit Store Order" /> <textarea name="message" class="noThis" style="display:none" id="cartMessage"></textarea> <span class="buttons"></span>
         <center>
            
            <button onclick="this.disabled = false;document.getElementById('sendingBut').disabled = false" class="button1" type="button" id="submitCart">
                <span><span>Update selected</span></span>
            </button>
            
            <center>
                <span style="font-family: Raleway,sans-serif;"><span style="color:red">Make sure to click update your selected items before sending!</span></span>
            </center>
            
         </center><span class="buttons"> </span>
         <center>
            
            <button disabled="disabled" id="sendingBut" class="button2" name="post" type="submit">
                <span><span>Proceed Purchase</span></span>
            </button>
            
         </center><span class="buttons"> </span>
      </form>
      
   </div>
</div>
<div style="clear:both;" id="k551be5">
   
   <div align="center">
      
      <div style="text-align:center; display:inline-block; margin:0 auto;">
         
         <table style="padding:0; margin:0; border:none;" cellpadding="0" cellspacing="0" border="0">
            
            <tbody>
               
               <tr>
                  
                  <td style="padding:32px;" valign="top">
                     
                  </td>
                  
                  <td style="padding:32px;" valign="top">
                     
                  </td>
                  
               </tr>
               
            </tbody>
            
         </table>
         
      </div>
      
   </div>
</div>

My store link:http://ocean.forums.fm/h2-store



I want my store to function and make the buy button work like this store:http://excellzone.mrforum.net/h4-online-shop


Please help! Thank you.

@JScript

Zuke
Forumember

Male Posts : 375
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum