Deep Inside osCommerce: The Cookbook
()
About this ebook
Related to Deep Inside osCommerce
Related ebooks
Wig Dealer: How to Start Your wig Business Rating: 0 out of 5 stars0 ratingsMastering Magento 2 - Second Edition Rating: 0 out of 5 stars0 ratingsLearning Magento 2 Administration Rating: 0 out of 5 stars0 ratingsPrestaShop Module Development Rating: 0 out of 5 stars0 ratingsWordPress 4.0 Site Blueprints - Second Edition Rating: 0 out of 5 stars0 ratingsWordPress 2.9 E-Commerce Rating: 0 out of 5 stars0 ratingsMarketing Performance: How Marketers Drive Profitable Growth Rating: 0 out of 5 stars0 ratingsMagento 1.3 Sales Tactics Cookbook Rating: 0 out of 5 stars0 ratingsLearning Magento Theme Development Rating: 0 out of 5 stars0 ratingsThe Ultimate Guide to Shopify: From Set to Optimization Rating: 3 out of 5 stars3/5Bootstrap Site Blueprints Volume II Rating: 0 out of 5 stars0 ratingsHow To Make $ 1000 Per Month Using Affiliate Marketing Rating: 0 out of 5 stars0 ratingsThe Product-Led Organization: Drive Growth By Putting Product at the Center of Your Customer Experience Rating: 0 out of 5 stars0 ratingsBuilding E-Commerce Solutions with WooCommerce - Second Edition Rating: 0 out of 5 stars0 ratingsThe Secrets Of The Winning Podcast Rating: 0 out of 5 stars0 ratingsEbook Marketing Warfare 20 Battle-Tested Tactics Rating: 0 out of 5 stars0 ratingsJoomla! 1.6 First Look Rating: 0 out of 5 stars0 ratingsDrupal 6 Site Builder Solutions Rating: 4 out of 5 stars4/5Magento Beginner's Guide Rating: 0 out of 5 stars0 ratingsMagento 2 Beginners Guide Rating: 0 out of 5 stars0 ratingsGetting Started with Drupal Commerce Rating: 0 out of 5 stars0 ratingsDropshipping 10m: Make big Profits 1st Month Rating: 0 out of 5 stars0 ratingsiOS 10 Programming for Beginners Rating: 4 out of 5 stars4/5Microsoft Dynamics NAV 2009: Professional Reporting Rating: 0 out of 5 stars0 ratingsQlikView Essentials Rating: 0 out of 5 stars0 ratingsMastering Chef Rating: 0 out of 5 stars0 ratingsDrupal 7 Business Solutions Rating: 0 out of 5 stars0 ratingsThe Internet Marketer's Handbook Rating: 0 out of 5 stars0 ratingsSix-Figure-Blogging Rating: 3 out of 5 stars3/5The Affiliate Marketer Start-up Guide: Fast Action Strategies To Start Your Affiliate Career! Rating: 5 out of 5 stars5/5
Information Technology For You
Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5The Design Inference Rating: 5 out of 5 stars5/5COMPUTER SCIENCE FOR ROOKIES Rating: 0 out of 5 stars0 ratingsCreating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Supercommunicator: Explaining the Complicated So Anyone Can Understand Rating: 3 out of 5 stars3/5Learning Microsoft Endpoint Manager: Unified Endpoint Management with Intune and the Enterprise Mobility + Security Suite Rating: 0 out of 5 stars0 ratingsCreating your MySQL Database: Practical Design Tips and Techniques Rating: 3 out of 5 stars3/5CompTia Security 701: Fundamentals of Security Rating: 0 out of 5 stars0 ratingsSummary of Super-Intelligence From Nick Bostrom Rating: 4 out of 5 stars4/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5Personal Knowledge Graphs: Connected thinking to boost productivity, creativity and discovery Rating: 5 out of 5 stars5/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Cyber Security Consultants Playbook Rating: 0 out of 5 stars0 ratingsInkscape Beginner’s Guide Rating: 5 out of 5 stars5/5Excel VBA: A Step-By-Step Tutorial For Beginners To Learn Excel VBA Programming From Scratch: 1 Rating: 4 out of 5 stars4/5A Mind at Play: How Claude Shannon Invented the Information Age Rating: 4 out of 5 stars4/5Random Tech Rating: 0 out of 5 stars0 ratingsCompTIA A+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Core 1 Exam 220-1101 Rating: 0 out of 5 stars0 ratingsCompTIA ITF+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam FC0-U61 Rating: 5 out of 5 stars5/5AWS Certified Cloud Practitioner - Practice Paper 1: AWS Certified Cloud Practitioner, #1 Rating: 5 out of 5 stars5/5Bitcoin for Nonmathematicians:: Exploring the Foundations of Crypto Payments Rating: 0 out of 5 stars0 ratingsAI Unplugged: Your Everyday Guide to Understanding Artificial Intelligence Rating: 0 out of 5 stars0 ratingsHow to Find a Wolf in Siberia (or, How to Troubleshoot Almost Anything) Rating: 0 out of 5 stars0 ratingsLinux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5AWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5CODING INTERVIEW: Advanced Methods to Learn and Excel in Coding Interview Rating: 0 out of 5 stars0 ratingsChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5
Reviews for Deep Inside osCommerce
0 ratings0 reviews
Book preview
Deep Inside osCommerce - Monika Mathé
Table of Contents
Deep Inside osCommerce: The Cookbook
Credits
Foreword
About the Author
About the Reviewers
Introduction
What This Book Covers
What You Need for This Book
How to Use This Book
Conventions
Reader Feedback
Customer Support
Downloading the Example Code for the Book
Errata
Questions
1. Chop and Cream the Basic Design
1. Add Easy Top-Category Driven Stylesheets
Presentation
Ingredients
Cooking
2. Create Flexible Column Definitions
Presentation
Ingredients
Cooking
Summary
2. Serve them New Menus
3. Show Active Subcategories only in Your Category Box
Presentation
Ingredients
Cooking
4. Create Separate Boxes for Each Top Category
Presentation
Ingredients
Cooking
5. Simplify Category Box Navigation by Defining Specific Colors for Each Level
Presentation
Ingredients
Cooking
6. Add Extra Links to Your Category Box
Presentation
Ingredients
Cooking
Summary
3. Spice Up Your Infoboxes
7. Move Your Infobox Header closer to Content
Presentation
Ingredients
Cooking
8. Make Your Infobox Header Taller
Presentation
Ingredients
Cooking
9. Add a Pop-Up Page from an Infobox Link
Presentation
Ingredients
Cooking
10. Add Images to Infoboxes
Presentation
Ingredients
Cooking
Variation #1
Ingredients
Cooking
Variation #2
Ingredients
Cooking
11. Add Extra Images to Your Columns without Framing Boxes
Presentation
Ingredients
Cooking
12. Hide or Show Boxes Driven by Language Choice
Presentation
Ingredients
Cooking
13. Add Boxes Dedicated to Specified Countries
Presentation
Ingredients
Cooking
14. Define Box-Image Size Independent of Product Thumbs
Presentation
Ingredients
Cooking
15. Show Manufacturers' Logos in the Manufacturers Infobox
Presentation
Ingredients
Cooking
16. Add Double Borders to Boxes with Background Matting
Presentation
Ingredients
Cooking
Summary
4. Stuff Your Product Display
17. Add Parent Category in Product Listing
Presentation
Ingredients
Cooking
Variation
18. Add Top Category in Product Listing
Presentation
Ingredients
Cooking
19. Add a Separator Line in Product Listing
Presentation
Ingredients
Cooking
20. Add a Cell Background and an Image Border to Product Listing
Presentation
Ingredients
Cooking
21. Sort Product Listing by Date Added
Presentation
Ingredients
Cooking
22. Prepare a Quick 'n Easy Review System for Product Listing
Presentation
Ingredients
Cooking
23. Whip Up a Top-Category Driven Product Listing
Presentation
Ingredients
Cooking
24. Control Manufacturer Image Size
Presentation
Ingredients
Cooking
25. Call a Pop Up from Product Description in Product Info
Presentation
Ingredients
Cooking
26. Call Unique Code for a Single Product in Product Info
Presentation
Ingredients
Cooking
27. Show a Pop Up with Shipping Options in Product Info
Presentation
Ingredients
Cooking
28. Add an Anchor for Options in Product Info
Presentation
Ingredients
Cooking
29. Integrate Tell a Friend into Product Info
Presentation
Variation #1
Ingredients
Cooking
Variation #2
Ingredients
Cooking
30. Offer an Ask a Question about a Product Link on Product Info
Presentation
Variation #1
Ingredients
Cooking
Variation #2
Ingredients
Cooking
31. Sell Affiliate Products from Your Catalog
Presentation
Ingredients
Cooking
32. Fill Up Also Purchased Products Search Result
Presentation
Ingredients
Cooking
33. Limit New Products to Those with an Image
Presentation
Ingredients
Cooking
34. Set Column Count for New Products
Presentation
Ingredients
Cooking
Summary
5. Dish Up a Better Search
35. Add Help Text to Your Search-Box Input Field
Presentation
Ingredients
Cooking
36. Set the Search-Result Value Independent of Admin Listings
Presentation
Ingredients
Cooking
37. Add an All Manufacturers Page to the Manufacturers Infobox
Presentation
Ingredients
Cooking
38. Customize Your Product Listing with Individual Boxes for Each Manufacturer
Presentation
Ingredients
Cooking
Summary
6. Grill that Checkout Process
39. Make Removing Products from the Cart more Intuitive
Presentation
Ingredients
Cooking
40. Remove Delivery Address Modification from Your Shipping Page
Presentation
Ingredients
Cooking
41. Modify Shipping Method Display for the Confirmation Page
Presentation
Ingredients
Cooking
42. Add a Sophisticated Gift Wrapping Option to the Shipping Page
Presentation
Ingredients
Cooking
43. Add the Option to Donate during Checkout
Presentation
Ingredients
Cooking
44. Personalize Your Order Confirmation Email
Presentation
Ingredients
Cooking
45. Add Your Customers' Email Addresses and Phone Numbers to Your Order Confirmation Email
Presentation
Ingredients
Cooking
46. Add Your Customers' Fax Numbers to Your Order Confirmation Email
Presentation
Ingredients
Cooking
47. Add the Products' Manufacturers to Your Order Confirmation Email
Presentation
Ingredients
Cooking
48. Add the Products' Category Tree to Your Order Confirmation Email
Presentation
Ingredients
Cooking
Summary
7. Whip Up New Shipping Options
49. Add Multiple Flat Rate Shipping Modules
Presentation
Ingredients
Cooking
50. Add Percentage and Base Price Support to Table Rate
Presentation
Ingredients
Cooking
51. Allow Free Postage for Free Items
Presentation
Ingredients
Cooking
52. Limit Flat Rate Shipping to a Specific Top Category Only
Presentation
Ingredients
Cooking
53. Hide Shipping Modules Driven by Weight
Presentation
Ingredients
Cooking
54. Create a Per Item Shipping Module with Two Price Levels
Presentation
Ingredients
Cooking
Summary
8. Season Your Payment Modules
55. Hide Payment Modules from Public Eyes
Presentation
Ingredients
Cooking
56. Create Dependencies between Shipping and Payment Modules
Presentation
Ingredients
Cooking
57. Offer Customized Payment Options for Selected Customers
Presentation
Ingredients
Cooking
Summary
9. Cook Up a Multiple Banner System
58. Set Up Category-Driven Banners
Presentation
Ingredients
Cooking
59. Create Rotating Banners that Link within Your Own Shop
Presentation
Ingredients
Cooking
Summary
10. Throw Together Dessert Extra Treats for You!
60. Display a Dynamic Shipping Table for Table Rate Shipping
Presentation
Ingredients
Cooking
61. Restructure and Customize Your File Download Module
Presentation
Ingredients
Cooking
62. Create a Dual Website Combining Shopping Cart and Showroom Features
Presentation
Ingredients
Cooking
Summary
11. Beef Up Your Admin
63. Reset Date Added for Products
Presentation
Ingredients
Cooking
64. Set an Expiry Date for Products
Presentation
Ingredients
Cooking
65. Limit Also Purchased Products Selection by Date
Presentation
Ingredients
Cooking
66. Display Full Information for Customer, Delivery, and Billing Addresses at a Glance
Presentation
Ingredients
Cooking
67. Highlight Orders According to their Order Status
Presentation
Ingredients
Cooking
68. Sort Your Administration Menu Configuration-Box Entries
Presentation
Ingredients
Cooking
69. Allow Entering Products in an Additional Currency
Presentation
Ingredients
Cooking
Summary
Index
Deep Inside osCommerce
Monika Mathé
Deep Inside osCommerce: The Cookbook
Copyright © 2006 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2006
Production Reference: 2150906
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 10: 1-84719-090-1
ISBN 13: 978-1-847190-90-1
www.packtpub.com
Cover Image by www.visionwt.com
Credits
Author
Monika Mathé
Reviewers
Carine Bruyndoncx
Jim Ekleberry
Karly Phillips
Development Editor
Louay Fatoohi
Assistant Development Editor
Nikhil Bangera
Technical Editor
Divya Menon
Editorial Manager
Dipali Chittar
Indexer
Mithil Kulkarni
Proofreader
Chris Smith
Layouts and Illustrations
Shantanu Zagade
Cover Designer
Shantanu Zagade
Foreword
osCommerce is more than simply an open-source e-commerce solution. For thousands and thousands of people, tweaking, adding, removing, and devising new and ingenious ways to enhance their online stores is not so much a chore as an engaging, fun, and above all, productive way of life.
Joining the osCommerce community means becoming part of a team of users and developers from all over the world who share a common passion for contributing to the project, or making use of it in any number of different ways. With a project like osCommerce that lends itself to such a wide variety of contributions, tools, tips, and tricks, it is important that you keep your finger on the pulse of the project.
Using the osCommerce website to discuss techniques and to share your ideas and solutions is part and parcel of being an active community member. It is also a great way to meet people with common ground, and help them with their projects or be helped in return; there is much to be learned from this medium.
I daresay, however, that there are few such members out there who have been more helpful and more supportive of osCommerce as whole than Monika—including helping me out, a while back!
It is really only fitting then that she has taken a step out of her normal online arena and written a book that mixes one part development experience with two parts fun to bring you an osCommerce cookbook to take delight in.
Good luck and have fun,
David Mercer
About the Author
Monika Mathé
Fascinated by being able to combine logic and creativity, it seems that destiny had finally found me when I became a software developer and Oracle Certified Database Administrator.
It was a tough call to decide in which field to work, but landing a position in a marketing agency and working with everything from Oracle to SQL Server and HTML, ASP, and JavaScript was a fabulous decision I still congratulate myself for! I learned more about marketing campaigns, e-commerce, CMS, and CRM than I had ever wanted to know, I mean, ever thought was possible!
I have been completely absorbed by the Open Source Community. I became an avid believer in PHP and in MySQL, and am definitely in a love affair with osCommerce. I believe almost anything can be done with it ... I challenge anyone to prove me wrong!
Being an active member of the osCommerce Online Community, I know preemptively which questions will arise in new shop creation. Presently, I am creating as many customized shops for clients as time permits; of course while urging them to add as many custom coded modules as I see fit ... that’s dessert for me!
With special thanks to my family, my forum friends, and my clients all over the world. You are the spice of my life!
Monika Mathé
Architect
Oracle Certified Database Administrator (OCP DBA)
osCommerce Expert
http://www.monikamathe.com
osCommerce Profile Name: Monika in Germany
http://forums.oscommerce.com/index.php?showuser=56607
About the Reviewers
Carine Bruyndoncx
With a masters degree combining business, finance, and IT, it seems only natural that I have been working in IT, for almost a decade, purely for international financial companies and institutions. During these years, I have touched upon a lot of different systems, databases, and programming languages, and held a range of positions from analyst-programmer, DBA, quality assurance, and support as well as team-leading and project management.
This international working environment management allowed me to build a solid IT foundation. While living abroad and traveling extensively, I learned to appreciate the cultural differences, habits, and the nice weather (though mostly in other parts of the world).
In recent years, my focus has shifted away from finance towards CTI, CRM, and e-business systems. Having experience with Vantive, Siebel, and a SAP CRM eSales certification under my belt, it was time to start a new chapter in 2004. Following my mantra, Think global, act local
I joined Keukenlust.be (my parents business) where among other responsibilites, I also handle the webshop (evidently based on osCommerce).
Since I can't stay away from computers, you might find me posting about osCommerce or other Open Source packages in my blog on the osCommerce forums, perhaps doing a little custom programming for clients, or troubleshooting complex problems, as time allows. I'm a perfectionist at heart; I like a good challenge; and guess what ... fruit salad is my favorite dessert !
Jim Ekleberry
Jim Ekleberry aka Jim Daemon from Tennessee, USA belongs to the top 20 list of osCommerce members and has been on the forums since January 2003. He likes meeting new people and making friends so working on this book as a technical reviewer was a great opportunity for him to show off his coding talents.
In his real life job, Jim works in his company Akoza which is a leading provider of Information Technology (IT) services and is an IT outsource partner for small and medium-sized businesses. He encourages all non-techie business people to spend their time on their business instead of their technology and have his company do the big business services for not-so-big companies.
His favorite quote is a clever remark by Albert Einstein, Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence.
— a perfect mantra for a tech reviewer!
http://www.akoza.com
Karly Phillips
Working wonders in the kitchen is like work in life itself... the preparations for something exceptional and fulfilling keep us at it; keep us coming back again and again to try it in different ways to improve ourselves and our causes.
I am not a master chef; my dining room table has no Michelin stars, but the 1/7th of my life I spend passionately mucking about in my kitchen, I hope, will result in much more than well-prepared meals—to create fond memories, not unlike those I have of my own mother, for my children.
I am equally passionate about my work with To Love Children Educational Foundation International Inc., an NGO with special consultative status to the ECOSOC of the United Nations. TLC is making a difference in the poorest of the developing countries of our world.
Monika kindly allowed me to share in the work of her kitchen, even giving me permission to lick the spoon from time to time. Chapter 3, Spice Up Your Infoboxes, was so intriguing to me, as a non-osCommerce user, that I read front to back Building Online Stores with osCommerce: Professional Edition by David Mercer, registered a domain, and downloaded a copy to play with… just to better understand it. It is a wonderful tribute to her passion!
With my best wishes,
Karly Phillips
www.karlyphillips.com
www.tolovechildren.org
Introduction
Dear fellow osCommerce community members, what’s for dinner tonight?
Your good old stew recipe probably doesn’t sound that appetizing anymore, and your customers probably share this view when they visit your website that hasn’t been spiced up recently for added interest.
Let’s whip up in our cuisine a donation module for that church, which prefers to collect alms not only during servicess, but also online these days. You may be an artist in need of an online showroom presenting courses, tutorials, and artwork in a content management system, with or without an added shopping-cart function as its backbone. Why not garnish your gift shop with a great solution for offering gift-wrapping choices during checkout.
osCommerce is a highly adaptable, fascinating piece of software that already offers most necessary ingredients to work with; yet you can compare it with a five-star restaurant where the secret trimmings and preparations make the unrivaled dishes.
Make your store truly yours by adding that special kick, which makes it stand out from the crowd of online shops. Just as you are willing to spend a dime on a fabulous five-star dinner prepared by the chef, you will find that your customers feel the same way, as your shop wins their favor due to your new custom code that enhances their shopping experience. Increased sales rates will show you just how much they really like those new treats.
With this book in your hands, you will find many inspiring ideas that will make you itch to dive into your code pages immediately. Some are only a few lines worth, some go knee-deep into core code changes, while others involve minor tackling of a lot of files with incredible outcomes. All will add that special flavor to your site that you have been looking for.
This step-by-step presentation of each tastefully prepared recipe will allow you to pick modules that you have always wanted to implement to finish off your store.
Your files are your ingredients; your brain is your equipment; add a bit of elbow grease, and your customers will be delighted to see the mouthwatering treats you cook up for them.
Just as a great cook can whip up an entire menu after a spoonful of that new gravy in his favorite restaurant, you too will be inspired to make changes similar to those in this book. You’ll learn about code reading and the great pleasure of making that code yours. While I suggest making most changes manually, you can request a file set of each recipe from Packt’s website by presenting a proof of purchase of this book. This will definitely come in handy with larger bits of code, when typing it all again could become messy.
But who cares about a bit of mess? Get out your apron and roll up your sleeves, and Bon appetit!
What This Book Covers
Chapter 1 equips you with a few, very easy, and very important changes to the basic design, which will make developing, and later modifying a whole new template a breeze.
Chapter 2 will help you modify your navigation to ensure a smoother shopping experience for your customers.
Chapter 3 covers infoboxes, and turns you into an expert in tweaking them to your needs.
Chapter 4 deals with one of the most important visual parts of your shop—the product display in the listings and the detail page.
Chapter 5 outlines different methods to make searching on your site a fun experience since you want your customers to use your search and to find the products you want to sell to them.
Chapter 6 highlights customizations of the checkout process, namely, the flow from the shopping cart to the shipping and payment pages up to the order email.
Chapter 7 talks about new shipping modules. You will learn how to adapt existing modules to create completely new rate systems for your shop.
Chapter 8 focuses on existing payment modules and how they can be tweaked.
Chapter 9 provides tips on efficiently using banners as a marketing tool.
Chapter 10 is a goody bag of extra special treats to indulge your sweet tooth.
Chapter 11 tackles changes in the admin area. You alone will be the keeper of these secret recipes hidden to the public eye.
What You Need for This Book
This book is for people who are already familiar with osCommerce. It presumes a working knowledge of PHP and HTML, as well as basic understanding of phpMyAdmin for database inserts.
How to Use This Book
As with any good cookbook, you can