Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 


       myfreeforum.org Forum Index -> ECommerce support
myff admin

Shop personal inventory display

{MYFF.SHOP mode="inventory"}

will pass the mode value into SHOP_S_MODE in the cms_shop.tpl template.

In the default template I have made this show a personal inventory of items. But this is quite flexible.
symon

Going to add one myself but wondering if you thought it was worth adding a global one.

In the buy back area placing a link which takes them straight to the buyback process screen, and that item in the basket to be sold .
myff admin

So in effect a link that will let people skip the "View basket" stage. I am a little uncomfortable about making that part of the default template.
symon

admin (no pm's please) wrote:
So in effect a link that will let people skip the "View basket" stage. I am a little uncomfortable about making that part of the default template.


Hmm see what you mean ok thinking cap on a link that takes them to the selling part of the shop ?

Working now almost done on a guide for all this.
symon

I,m not seeing a display of my images if i enter

{MYFF.SHOP mode="inventory"}  into a webpage i then see this

http://facebookappchat.co.uk/inventory.html
myff admin

Are you using the default cms_shop.tpl?
symon

admin (no pm's please) wrote:
Are you using the default cms_shop.tpl?


Working on www.farnboroughinvincibles.co.uk

but cant get it to work on

www.facebookappchat.co.uk

as far as i,m aware i,m using the default template. i know i wasnt but copied a working copy back into it.

Spoiler:

<script src="/language-en.js"></script>


<script>

//Options for Everyone:
MonetarySymbol        = '{SHOP_CURRENCYSYMBOL}';
DisplayNotice         = {SHOP_ALERTONADD};;
DisplayShippingColumn = {SHOP_ENABLESHIPPING};
DisplayShippingRow    = {SHOP_ENABLESHIPPING};
DisplayTaxRow         = {SHOP_TAX};
TaxRate               = {SHOP_TAXRATE};
TaxByRegion           = false;
TaxPrompt             = 'For tax purposes, please select if you are an Non Uk resident before continuing';
TaxablePrompt         = 'Non Uk';
NonTaxablePrompt      = 'Uk';
MinimumOrder          = {SHOP_MINIMUMORDER};
MinimumOrderPrompt    = 'Your order is below our minimum order, please order more before checking out.';

//Payment Processor Options:
PaymentProcessor      = '{SHOP_CHECKOUTTYPE}';

//Options for Programmers:
OutputItemId          = 'ID_';
OutputItemQuantity    = 'QUANTITY_';
OutputItemPrice       = 'PRICE_';
OutputItemName        = 'NAME_';
OutputItemShipping    = 'SHIPPING_';
OutputItemAddtlInfo   = 'ADDTLINFO_';
OutputOrderSubtotal   = 'SUBTOTAL';
OutputOrderShipping   = 'SHIPPING';
OutputOrderTax        = 'TAX';
OutputOrderTotal      = 'TOTAL';
AppendItemNumToOutput = true;
HiddenFieldsToCheckout = false;

function move()
{
window.location = "{U_SHOP_ACTION}";
}

function confirmClearBasket()
{
if (confirm("Are you sure you want to empty your shopping basket?"))
{
SetCookie ('NumberOrdered', 0, null, '/');
setTimeout('move()',1);

}
}

</script>
<script src="/mycart.js" ></script>
<!-- IF SHOP_MESSAGE <>"" -->
<h1>{SHOP_MESSAGE}</h1>
<!-- ENDIF -->

<!-- IF SHOP_CLEARBASKET == 1 -->
Shopping basket emptied<br/>
<script>
SetCookie ('NumberOrdered', 0, null, '/');
</script>
<!-- ENDIF -->

<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<!--BEGIN switch_shop_title -->
<tr>
       <th colspan="1" width="100%" height="25" class="thTop" nowrap="nowrap"> {SHOP_TITLE}</th>
  </tr>
<!--END switch_shop_title -->  



<!-- IF SHOP_S_MODE == 1 or SHOP_S_MODE == 0 -->
<!-- Individual Item or many items -->


<tr>
       <td>{SHOP_DESCRIPTION}</td>
</tr>
<!-- IF SHOP_VIRTUAL == 1 -->
<!-- IF USER_ID > 0 -->
<tr><td>You have {SHOP_CURRENCYSYMBOL}{SHOP_AVAILABLEFUNDS} available funds</td></tr>
<!-- ELSE -->
<tr><td>You will have to login to use the virtual shop</td></tr>
<!-- ENDIF -->
<!-- ENDIF -->
<tr>
<td>
<!-- IF SHOP_BUYBACKMODE == 1 -->
<tr><td>
You are selling back to the shop
</td></tr>
<!-- ENDIF -->
<!-- IF SHOP_S_MODE == 1 -->
<!-- many items -->
<table>


<!-- BEGIN shop_row -->
<tr>
<!-- BEGIN shop_column -->
<td valign="top" >
<h3>{shop_row.shop_column.NAME}</h3>
<br />
<a href="{shop_row.shop_column.IMAGE_URL}"><img src="{shop_row.shop_column.THUMBNAIL_IMG}" {SHOP_SIZE} /></a>
<br />
{shop_row.shop_column.DESCRIPTION}
<br />
<!-- IF shop_row.shop_column.TAX > 0 -->
{SHOP_CURRENCYSYMBOL}{shop_row.shop_column.TAXEDPRICE} (Includes {SHOP_CURRENCYSYMBOL}{shop_row.shop_column.TAX} sales tax)
<!-- ELSE -->
{SHOP_CURRENCYSYMBOL}{shop_row.shop_column.PRICE}
<!-- ENDIF -->
<br />
<!-- IF shop_row.shop_column.OWNED > 0 -->
You own {shop_row.shop_column.OWNED} of this item
<!-- ELSE -->
&nbsp;
<!-- ENDIF -->
<br />
<!-- IF SHOP_LIVE > 0 -->
<br />
<form name="order" method="post" action="{U_SHOP_ACTION}&mode=viewcart" onSubmit="AddToCart(this);">
     Quantity: <input type="text" size="2" maxlength="3" name="QUANTITY" onChange='this.value=CKquantity(this.value)' value="1">
<!-- IF SHOP_BUYBACKMODE == 1 -->
     <input type="image" src="/shop/images/buynow.gif" border=0 value="Add to Cart" align=top>
<!-- ELSE -->

<input type="image" src="/shop/images/buynow.gif" border=0 value="Add to Cart" align=top>
<!-- ENDIF -->
     <input type=hidden name=PRICE value="{shop_row.shop_column.PRICE}">
     <input type=hidden name=NAME value="{shop_row.shop_column.NAME}">
     <input type=hidden name=ID_NUM value="{shop_row.shop_column.XPROFILE}">

     <input type=hidden name=SHIPPING value="{shop_row.shop_column.SHIPPING}">
</form>
<br />
<!-- ENDIF -->

</td>
<!-- END shop_column -->
</tr>
 <!-- END shop_row -->
</td>
</tr>
</table>

<!-- ENDIF -->
<!-- IF SHOP_S_MODE == 0 -->
<!-- Individual Item -->
<table>



<tr>
<!-- BEGIN shop_column -->
<td valign="top">
{shop_column.NAME}<br />
<img src="{shop_column.FULL_IMG}" {SHOP_SIZE} /><br />
<!-- IF shop_column.LONG_DESCRIPTION != "" -->
{shop_column.LONG_DESCRIPTION}<br />
<!-- ELSE -->
{shop_column.DESCRIPTION}<br />
<!-- ENDIF -->

<!-- IF shop_column.TAX > 0 -->
{SHOP_CURRENCYSYMBOL}{shop_column.TAXEDPRICE} (Includes {SHOP_CURRENCYSYMBOL}{shop_column.TAX} sales tax)<br/>
<!-- ELSE -->
{SHOP_CURRENCYSYMBOL}{shop_column.PRICE}<br/>
<!-- ENDIF -->
<!-- IF shop_column.OWNED > 0 -->
You own {shop_column.OWNED} of this item<br/>
<!-- ENDIF -->
<!-- IF SHOP_LIVE > 0 -->
<form name="order" method="post" action="{U_SHOP_ACTION}&mode=viewcart" onSubmit="AddToCart(this);">
     Quantity: <input type="text" size="2" maxlength="3" name="QUANTITY" onChange='this.value=CKquantity(this.value)' value="1">
<!-- IF SHOP_BUYBACKMODE == 1 -->
     <input type="image" src="/shop/images/buynow.gif" border=0 value="Add to Cart" align=top>
<!-- ELSE -->

<input type="image" src="/shop/images/buynow.gif" border=0 value="Add to Cart" align=top>
<!-- ENDIF -->
     <input type=hidden name="PRICE" value="{shop_column.PRICE}">
     <input type=hidden name="NAME" value="{shop_column.NAME}">
     <input type=hidden name="ID_NUM" value="{shop_column.XPROFILE}">

     <input type=hidden name="SHIPPING" value="{shop_column.SHIPPING}">
</form>
<!-- ENDIF -->
</td>
<!-- END shop_column -->
</tr>

</table>
</td>
</tr>


<!-- ENDIF -->
<!-- ENDIF -->

<!-- IF SHOP_S_MODE == 2 -->
<!-- Shopping cart -->
<tr><td>


<!-- IF SHOP_BUYBACKMODE == 1 -->
This shop will buy back the following items:
<!-- ELSE -->
The items listed below are currently in your shopping cart:
<!-- ENDIF -->
<!-- confirm.siml -->
</td></tr>
<tr><td><table>
<tr><td>
<form ACTION="{U_SHOP_ACTION}&mode=checkout" NAME="form" METHOD="post" onsubmit="return ValidateCart(this)">
<script>
   ManageCart();
</script>
</td>
</tr>
<tr>
<td align=center>

<input type="image" src="/shop/images/checkout.gif" border="0">

</form>
</td>
</tr>
</table>

<!-- ENDIF -->

<!-- IF SHOP_S_MODE == 3 -->
<!-- Order Page -->
<!-- IF SHOP_VIRTUAL == 0 -->
<script>
function CheckForm( theform )
{
var bMissingFields = false;
var strFields = "";

if( theform.b_first.value == '' ){
bMissingFields = true;
strFields += "     Billing: First Name\n";
}
if( theform.b_last.value == '' ){
bMissingFields = true;
strFields += "     Billing: Last Name\n";
}
if( theform.b_addr.value == '' ){
bMissingFields = true;
strFields += "     Billing: Address\n";
}
if( theform.b_city.value == '' ){
bMissingFields = true;
strFields += "     Billing: City\n";
}
if( theform.b_state.value == '' ){
bMissingFields = true;
strFields += "     Billing: State\n";
}
if( theform.b_zip.value == '' ){
bMissingFields = true;
strFields += "     Billing: Zipcode\n";
}
if( theform.b_phone.value == '' ){
bMissingFields = true;
strFields += "     Billing: Phone\n";
}
if( theform.b_email.value == '' ){
bMissingFields = true;
strFields += "     Billing: Email\n";
}

if( bMissingFields ) {
alert( "I'm sorry, but you must provide the following field(s) before continuing:\n" + strFields );
return false;
}

return true;
}
</script>
<!-- ENDIF -->
<!-- IF SHOP_CHECKOUTTYPE == "lp" -->
<!--  LinkPoint -->
<form action="https://secure.linkpt.net/lpcentral/servlet/lppay" method="post">
     <script>
        CheckoutCart();
     </script>
  <input type="hidden" name="storename" value="{SHOP_PAYMENTID">
  <input type=submit value="Proceed to payment">
  </form>
<!-- ELSEIF SHOP_CHECKOUTTYPE == "wp" -->
<!--  WorldPay -->
<form action="https://select.worldpay.com/wcc/purchase" method="post">
     <script>
        CheckoutCart();
     </script>
  <input type=hidden name="instId" value="{SHOP_PAYMENTID}">
  <input type=hidden name="currency" value="USD">
  <input type=hidden name="testMode" value="0">
  <input type=hidden name="cartId" value="WebPurchase">
  <input type=submit value="Proceed to payment">
  </form>
<!-- ELSEIF SHOP_CHECKOUTTYPE == "gc" -->

<form method="POST" action="https://checkout.google.com/cws/v2/Merchant/{SHOP_PAYMENTID}/checkoutForm" accept-charset="utf-8">
<input type="hidden" name="_charset_"/>
<SCRIPT>
CheckoutCart();
</SCRIPT>
<input type="image" name="Google Checkout" alt="Fast checkout through Google Checkout" src="https://checkout.google.com/buttons/checkout.gif?merchant_id={SHOP_PAYMENTID}&w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180"/>
<br />
</form>

<!-- ELSEIF SHOP_CHECKOUTTYPE == "an" -->
<!--   Authorize.net -->
<form ACTION="https://secure.authorize.net/gateway/transact.dll" method="post">
     <script>
        CheckoutCart();
     </script>
  <input TYPE=HIDDEN NAME="x_Login" VALUE="{SHOP_PAYMENTID">
  <input type=submit value="Proceed to payment">
  </form>
<!-- ELSEIF SHOP_CHECKOUTTYPE == "pp" -->
<!--  PayPal -->
<form action="https://www.paypal.com/us/cgi-bin/webscr" method="post">
<script>
        CheckoutCart();
     </script>
Pay with paypal
<INPUT type="hidden" value=_cart name="cmd">
<INPUT type="hidden" value="1" name="upload">
<INPUT type="hidden" value="{SHOP_PAYMENTID}" name="business">
<INPUT type="hidden" value="GBP" name="currency_code">
<!-- IF SHOP_ENABLESHIPPING == 0 -->
<INPUT type="hidden" value="1" name="no_shipping">
<!-- ENDIF -->
<INPUT type="hidden" value="http://{SHOP_DOMAIN}/{U_SHOP_ACTION}&mode=paid" name="return">
<INPUT type="hidden" value="http://{SHOP_DOMAIN}/{U_SHOP_ACTION}&mode=notify" name="notify_url">
<INPUT type="hidden" value="http://{SHOP_DOMAIN}/{U_SHOP_ACTION}&mode=paycancel" name="cancel_return">
<INPUT type="hidden" value="2" name="rm">
<INPUT type="hidden" value="Please include additional instructions if needed. Thank you!" name="cn">
<INPUT type="image" height="23" alt="BUY NOW VIA PAYPAL" width="37" src="/shop/images/PayPal_mark_37x23.gif">
<INPUT type="image" height="23" alt="BUY NOW VIA PAYPAL" width="37" src="/shop/images/logo_ccVisa.gif">
<INPUT type="image" height="23" alt="BUY NOW VIA PAYPAL" width="37" src="/shop/images/logo_ccDiscover.gif">
<INPUT type="image" height="23" alt="BUY NOW VIA PAYPAL" width="37" src="/shop/images/logo_ccMC.gif">
<INPUT type="image" height="23" alt="BUY NOW VIA PAYPAL" width="37" src="/shop/images/logo_ccAmex.gif">
<br />
  </form>
<!-- ELSEIF SHOP_CHECKOUTTYPE == "virtual" -->

<!-- virtual payment method  -->
<form action="{U_SHOP_ACTION}&mode=pay" method="POST" onSubmit="return CheckForm(this)">
   <nobr>
   <script>
       CheckoutCart();
   </script>
   </nobr>
<input type="submit" value="Submit Order"> <input type="reset" value="  Clear Form  ">
</form>

<!-- ELSE -->

<!-- no payment method, use billing -->
<form action="{U_SHOP_ACTION}&mode=bill" method="POST" onSubmit="return CheckForm(this)">
   <nobr>
   <script>
       CheckoutCart();
   </script>
   </nobr>

<br>
<P>
<!-- IF SHOP_VIRTUAL == 0 -->
<font class="blacktext">
<b>Please fill out the following information below to complete your order.</b>
</font>

<p>
<b><font class="greetext">Billing Information:</font></b><P>

<TABLE class="blacktext">
<TR><TD>Name:    </TD><TD><input type="text" size="18" name="b_first"> <input type="text" size="15" name="b_last"></TD></TR>

<TR><TD>Address: </TD><TD><input type="text" size="37" name="b_addr"> </TD></TR>
<TR><TD>Address: </TD><TD><input type="text" size="37" name="b_addr2"></TD></TR>
<TR><TD>City:    </TD><TD><input type="text" size="21" name="b_city"> </TD></TR>
<TR><TD>State/County:   </TD><TD><input type="text" size="12"  name="b_state"> </TD></TR>
<TR><TD>Zip/Post code:     </TD><TD><input type="text" size="5"  name="b_zip"></TD></TR>
<TR><TD>Phone:   </TD><TD><input type="text" size="37" name="b_phone"></TD></TR>
<TR><TD>Fax:     </TD><TD><input type="text" size="37" name="b_fax"></TD></TR>
<TR><TD>Email:   </TD><TD><input type="text" size="37" name="b_email"> </TD></TR>
</TABLE>
<p>
<!-- IF SHOP_ENABLESHIPPING > 0 -->
<b><font class="greetext">Shipping Information (if different than billing):</font></b><P>
<TABLE class="blacktext">
<TR><TD>Name:    </TD><TD><input type="text" size="18" name="s_first"> <input type="text" size="15" name="s_last"></TD></TR>
<TR><TD>Address: </TD><TD><input type="text" size="37" name="s_addr"> </TD></TR>
<TR><TD>Address: </TD><TD><input type="text" size="37" name="s_addr2"></TD></TR>
<TR><TD>City:    </TD><TD><input type="text" size="21" name="s_city"> </TD></TR>
<TR><TD>State/County   </TD><TD><input type="text" size="12"  name="s_state"> </TD></TR>
<TR><TD>Zip/Post code:     </TD><TD><input type="text" size="5"  name="s_zip"></TD></TR>
<TR><TD>Phone:   </TD><TD><input type="text" size="37" name="s_phone"></TD></TR>
<TR><TD>Fax:     </TD><TD><input type="text" size="37" name="s_fax"></TD></TR>
<TR><TD>Email:   </TD><TD><input type="text" size="37" name="s_email"> </TD></TR>
</TABLE>
<!-- ENDIF -->
<p>
<FONT class="blacktext">
<b><font class="greetext">Comments/Special Instructions:</font></b><P>
<TEXTAREA NAME="comment" ROWS=6 COLS=40>
</TEXTAREA>
</font>
<!-- ELSE -->
<p>Submit your virtual order here</p>
<!-- ENDIF -->

<input type="submit" value="Submit Order"> <input type="reset" value="  Clear Form  ">
   </p>
   </center>    
   </FORM>    
<!-- ENDIF -->
<!-- ENDIF -->

<!-- IF SHOP_S_MODE == 4 -->
<!-- Order received  -->
Thank you for your order


<!-- ENDIF -->
<!-- IF SHOP_S_MODE == 5 -->
<!-- Incomplete checkout  -->
You did not complete the checkout payment process


<!-- ENDIF -->

<tr><td>
<!-- IF SHOP_LIVE > 0 -->
<!-- IF SHOP_BUYBACKMODE == 0 -->
<a href="/appyshop.html"><img src="/shop/images/backtoshop.png" border="0"></a>&nbsp;
<!-- ELSE -->
<a href="{U_SHOP_ACTION}">Continue Selling</a>&nbsp;
<!-- ENDIF -->
<a href="javascript:void()" onClick="confirmClearBasket()"><img src="/shop/images/clearbasket.png" border="0"></a>&nbsp;
<a href="/appyshop.html?component=shop&mode=viewcart"><img src="/shop/images/viewbasket.gif" border="0"></a>&nbsp;

<!-- IF SHOP_BUYBACKMODE == 0 && SHOP_BUYBACKALLOWED == 1 -->
<a href="{U_SHOP_ACTION}&buybackmode=1"><img src="/shop/images/sellback.png" border="0"></a>&nbsp;
<!-- ELSEIF SHOP_BUYBACKMODE == 1 -->
<a href="{U_SHOP_ACTION}&sell=1">Switch to buying mode (basket will be emptied)</a>&nbsp;

<!-- ENDIF -->
<!-- ENDIF -->
</td></tr>
</table>

myff admin

No sign of "inventory" in that template!
symon

Seems my cms_shop.tpl was a little screwy my fault have been playing with it.

Anyway i have copied another working one and inventory is now showing.
myff admin

I have to thank you as ever for taking the strain of playing with bleeding edge portals.

it seems inevitable that for the first week or so, anything you build is liable to get trashed as new ideas change the ball game.

The inventory is a case in point it was not something I had thought of and a backwards incompatible change had to be made to keep things "right". In a few months time the change would have to have been made less brutally, but for now I have to take the opportunity to make things the best they can be for the future.
symon

Your welcome.

I have to play around with them to fine tune the guides i write but this one has been fun but at same time hair pulling, got to say one of the longest time consuming guides i have written.

       myfreeforum.org Forum Index -> ECommerce support
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum