News:

Wondering if this will always be free?  See why free is better.

Main Menu

Idea for a Free SMF Shopping Cart

Started by larryhyman, February 10, 2011, 06:04:05 PM

Previous topic - Next topic

larryhyman

Both Paypal and Mal's Commerce, offer BUY NOW and View Cart Buttons, and are Free. On both sites, they even generate the HTML for you.....

Since we can use SSI to create HTML pages that match our SMF site (see my home page for an example)

Combining both ideas, may allow me to create a Shopping Cart Catalog Template System....

I would like to know any feedback to this idea before I start this project....

What do you think?
In god we trust, all others pay cash !

http://hyman.sytes.net

larryhyman

#1
1) sign up for paypal merchant services (or google checkout)

2) create a template start with this code:


<?php
require('smforums/SSI.php'); // make sure path is right
$context['page_title_html_safe'] = 'Welcome to My Shopping Cart'// change this to what you want, it is the page title
template_header();
?>

<div class="windowbg" style="width:60%; margin-left: auto;margin-right: auto;">
<!--
I added width and centering, you can take it out if you want
-->
   <span class="topslice"><span></span></span>
   <div class="content">
<!-- start content -->
your shopping cart code goes here
<!-- end content-->
</div>
   <span class="botslice"><span></span></span>
</div>
<?php
template_footer
();
?>



3) Go here to generate your shopping cart code:

http://www.fatfreecart.com/code_gen.php

4) add your code to your template

ALL DONE

My demo is at:

http://hyman.sytes.net/securitycd.php


<?php
require('smforums/SSI.php');
$context['page_title_html_safe'] = 'Welcome to My Shopping Cart';
template_header();
?>

<div class="windowbg" style="width:50%; margin-left: auto;margin-right: auto;">
   <span class="topslice"><span></span></span>
   <div class="content">
<!-- start content -->

<!--
  FatFreeCart.com AddToCart Snippet
  @version: 0.1
  @date: 07/30/2007
  @author: Ropu (rovagnati at gmail)
  //-->
  <table cellspacing="2" cellpadding="5" bgcolor="#ffffff" style="border: thin solid rgb(100,100,100);font-family: Verdana; font-size: 11px; color: rgb(0, 0, 0);margin-left: auto;margin-right: auto;">   
    <tr align="center">
      <th bgcolor="#dddddd" style="color: rgb(0, 0, 0);"><big>Larry Hyman Computer Services T-Shirt</big><br />
   ($39.95 USD EACH TAX AND SHIPPING INCLUDED)</th>
    </tr>
    <tr>
      <td align="center">
      <!-- ADD TO CART button code. -->
        <form target="ej_ejc" action="https://www.e-junkie.com/ecom/fgb.php?c=cart&cl=1&ejc=2" method="post">
        <div style="background:#eeeeee">
                        Please Choose Size
                    <input type="hidden" name="on0" value="Size"/>
<select name="os0" style="width:20%">
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
</select>
</div>
 
      <!-- google merchant id (remove if not using Google Checkout) -->
          <input type="hidden" name="merchant_id" value=""/>
      <!-- paypal email(remove if not using PayPal) -->
          <input type="hidden" name="business" value="[email protected]"/>
      <!-- site url -->
          <input type="hidden" name="site_url" value="http://hyman.sytes.net"/>
      <!-- contact email (where we can notify of the updates) -->
          <input type="hidden" name="contact_email" value="[email protected]"/>
      <!-- you thank you page -->
          <input type="hidden" name="return_url" value="http://hyman.sytes.net/shop.php"/>
      <!-- any custom info you want to pass -->
          <input type="hidden" name="custom" value=""/>
      <!-- currency (USD for Google Checkout USA, GBP for Google Checkout UK. For PayPal: any currency that PayPal supports -->
          <input type="hidden" name="currency_code" value="USD"/>
      <!-- shipping cost -->
          <input type="hidden" name="shipping" value="0"/>
      <!-- shipping cost of each additional unit -->
          <input type="hidden" name="shipping2" value="0"/>
      <!--handling cost -->
          <input type="hidden" name="handling" value=""/>
      <!-- tax (flat amount, NOT percentage)-->
          <input type="hidden" name="tax" value="0"/>
      <!-- item name -->
          <input type="hidden" name="item_name" value="Larry Hyman Computer Services T-Shirt ($39.95 USD EACH TAX AND SHIPPING INCLUDED)"/>
      <!-- item number (should be different for each product)-->
          <input type="hidden" name="item_number" value="1"/>
      <!-- item price -->
          <input type="hidden" name="amount" value="39.95"/>
      <!-- initial quantity -->
          <input type="hidden" name="quantity" value="1"/>
      <!-- item options (can be removed if not required) -->
          <input type="image" src="https://www.e-junkie.com/ej/ej_add_to_cart.gif" border="0" onClick="javascript:return EJEJC_frm(this.parentNode);">
        </form>
      </td>
    </tr> 
  </table>
  <br />
  <div style="text-align: center;">
          <!-- VIEW CART button code. -->
        <a href="https://www.e-junkie.com/ecom/fgb.php?c=cart&cl=1&ejc=2&merchant_id=&[email protected]" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);">
          <img src="https://www.e-junkie.com/ej/ej_view_cart.gif" border="0" />
        </a>
        </div>
 
    <script language="javascript" type="text/javascript">
  <!--
  function EJEJC_lc(th) { return false; }
  // -->
  </script>
  <script type="text/javascript" src="https://www.e-junkie.com/ecom/box.js"></script>
   
  <!-- End FatFreeCart.com AddToCart Snippet v0.1 -->







<!-- end content-->
</div>
   <span class="botslice"><span></span></span>
</div>
<?php
template_footer
();
?>

In god we trust, all others pay cash !

http://hyman.sytes.net


SlammedDime

It may work for the simplest of needs... but I would not use anything of the sort on a site that needs ecommerce to survive or uses ecommerce as a primary means of income.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

JBlaze

Jason Clemons
Former Team Member 2009 - 2012

larryhyman

QuoteIt may work for the simplest of needs... but I would not use anything of the sort on a site that needs ecommerce to survive or uses ecommerce as a primary means of income.

I guess that's what Zen Cart (and the like) are for, but this is a fast 5 min solution for a quick sale of something.....

(and it's the only Free SMF ecommerce solution that I could find)
In god we trust, all others pay cash !

http://hyman.sytes.net

Advertisement: