I really enjoy working with new web technologies and recently I’ve been working with the Shopp plug-in for WordPress. The plug-in itself is a little quirky because there is no free or basic version of the plug-in however you do get what you pay for and in this case Shopp delivered on my expectations.
One thing that I am sure most people running an ecommerce website need is customization during the checkout process. Shopp does allow for customization and styling the shopping cart which can be difficult depending on the shopping cart you use. Today I am going to show you some PHP code that will allow you to add fields to your checkout page in Shopp. If you have some custom fields that you need to add to your checkout page on your ecommerce website you can do so with the following tag.
<?php shopp(‘checkout’,’order-data’, ‘name=Comments&type=textarea’); ?>
What this tag allows for is two things. One is that you can create a form field on the checkout page of a certain type (text, textarea, etc.) and two, you can collect this information on the receipt of the order and it will appear in the backend when you view the order under “Details”.
Another thing that you may want to tweak about the Checkout.php page in Shopp is where it says “Same Shipping address” checkbox. By default this is always going to be checked however you may not want this option selected. In order to do this you must edit the checkout.php file where the following tag is found…
<?php shopp(‘checkout’,’same-shipping-address’); ?>
And change it to…
<?php shopp(‘checkout’,’same-shipping-address’,’checked=off’); ?>
Adding “checked=off” variable means that the checkbox will be loaded when the web page loads as an unchecked checkbox and doing this in Shopp will show both the Billing and Shipping Address fields and it will look similar to this…
I hope that if you are using Shopp plug-in for WordPress that these tips saved you a little time.