facebook

Javascript Shopping Cart

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #335946 Reply

    Peacemaker
    Member

    Hi i have a web based javascript to add shopping cart, items cost etc. This is fully functional as i have tested it and implemented in html.

    Now the issue I am having so much issues customising it to meet mobione, for example i don’t know where the header is in mobione? lol

    I have tried to using it in the custom_js file to no avail?

    can you help me with this or do you have a template shopping cart for mobione(would be fantastic) to use in my project. I’m also wondering if anyone has done somthing similer. Since there are alot oif apps that have shopping carts/take payment etc, i think the payment aspect is easy paypal merchant account etc, but the shopping cart scripts are so hard.

    By the way mobione is a remarkable app! keep doing the good work. Many thanks in advance

    p.s-
    I have been scripting in html for a while, but having issues implementing web based work into MobiOne apps, also is possible to use html editor such as dreamweaver to edit the output files, but how can you use them(out put html files) again in mobione(.mob) in order to compile them as .ipa etc?

    #335948

    Brandon
    Member

    Which shopping cart are you trying to implement? I can take a look at it for you.

    #335978

    Peacemaker
    Member

    I have attached the JS file and below is the following code

    HEADER!
    <script type=”text/javascript” src=”http://jscart.googlecode.com/svn/jscart.js”></script&gt; <script type=”text/javascript”>
    simpleCart.email = “aminaabdalla@london.com”; simpleCart.checkoutTo = PayPal; // simpleCart.merchantId = “118575326044237”; // simpleCart.checkoutTo = GoogleCheckout; simpleCart.currency = USD; // simpleCart.currency = GBP; // simpleCart.currency = EUR; simpleCart.taxRate = 0.078; // simpleCart.shippingFlatRate = 5.25; simpleCart.shippingQuantityRate = 1.00; /* CartItem.prototype.shipping = function(){ if( this.size ){ switch( this.size.toLowerCase() ){ case ‘small’: return this.quantity * 10.00; case ‘medium’: return this.quantity * 12.00; case ‘large’: return this.quantity * 15.00; case ‘bull’: return 45.00; default: return this.quantity * 5.00; } } }; */ simpleCart.cartHeaders = [“Thumb_image_noHeader”, “Name” , “Size_input_div_div”, “Price” , “decrement_noHeader” , “Quantity”, “increment_noHeader”, “remove_noHeader”, “Total” ];
    </script>

    BODY [Items and add button]

    <ul> <li class=”simpleCart_shelfItem”> <h1 class=”item_name”>Evolution T-Shirt</h1> <p>Sale Price: <span class=”item_price”>$28.00</span></p> <img src=”http://www.websitex.com/pictures/tshirt.jpg&#8221; /> <p>Select Size: <select class=”item_Size”> <option value=”Small”>Small</option> <option value=”Medium”>Medium</option> <option value=”Large”>Large</option> </select></p> <p>Quantity: <input type=”text” class=”item_quantity” value=”1″ style=”width:20px;” /></p> <p><input type=”button” class=”item_add” value=”Add to cart” /></p> </li> <li class=”simpleCart_shelfItem”> <h1 class=”item_name”>Baseball Hat</h1> <p>Sale Price: <span class=”item_price”>$12.00</span></p> <img src=”http://www.websitex.com/pictures/black_hat.jpg&#8221; /> <p>Select Size: <select class=”item_Size”> <option value=”Black”>Black</option> <option value=”White”>White</option> </select></p> <p>Quantity: <input type=”text” class=”item_quantity” value=”1″ style=”width:20px;” /></p> <p><input type=”button” class=”item_add” value=”Add to cart” /></p> </li> </ul>

    Mini
    content of cart
    Cart: <span class=”simpleCart_total”></span> (<span class=”simpleCart_quantity”></span> items) <br /> <a href=”javascript:;” class=”simpleCart_empty”>Empty Cart</a> <a href=”#” class=”viewcart”>Viewcart</a>

    Full Content of Cart and checkout button to paypal

    <div class=”simpleCart_items” ></div> <div style=”clear:left”></div> <div class=”couponcode”>Coupon Code<br /> <input type=”text” id=”ccv” value=”” onchange=”simpleCart.applydiscount()” /></div> SubTotal: <span class=”simpleCart_total”></span> <br /> Tax: <span class=”simpleCart_taxCost”></span><br /> Shipping: <span class=”simpleCart_shippingCost”></span><br /> <span id=”couponcode”></span><br /> Final Total: <span class=”simpleCart_finalTotal”></span><br /> <a href=”#” class=”simpleCart_checkout”>checkout</a>
    </body>

    help please ….

    Attachments:
    You must be logged in to view attached files.
    #335982

    Brandon
    Member

    A really quick sample – using the default info on the Google Code Page

    Attachments:
    You must be logged in to view attached files.
    #336855

    Peacemaker
    Member

    Thank you cincy!

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Javascript Shopping Cart

You must be logged in to post in the forum log in