blog.calebnance.com

It's So Loud, Inside My Head...

Sunday, 15 January 2012 19:08

My E-commerce for Joomla 1.5?

I have been toying around with an E-commerce Component for Joomla for a while now. I have used Virtuemart for one site, and that is the last time I will be using that component. It is too bulky, yes it is free, and comes with a huge options library, but what about the smaller stores? Do you honestly think that a regular user could use Virtuemart with ease? I want to put something out there (Commercial or free, undecided) that will be easy to use and straight to the point. That is what I try to do with all the extensions I have made so far. I think that is where everything is going, I want to help someone that is a regular user on the internet to be able to download my component, and have a store set up within 30 minutes. I have a lot of code for the E-commerce already created, but what about Joomla 1.7 and 2.5? I honestly think people jumped the gun with creating live websites with Joomla 1.7. It is great, but no where near the stable version Joomla 1.5.25. I still think it will be a good year before 2.5 is where Joomla 1.5.25 is.

Published in Components

Today I wanted to show you how easy it is to add a content editor in your Joomla component form.

Published in Code

First we want to have the array of States in our code. See Below.

$states = array("AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","HI","IA","ID",
"IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MS","MT","NC","ND","NE","NH",
"NJ","NM","NV","NY","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VA","VT","WA",
"WI","WV","WY");

Then you want to create the list (select list options). Above is the simplest way of creating a state array, but right now the key of each array is 0, 1, 2. This is not what we want, we want the key and value of the array to be the same. So this next line fixes just that.

Published in Code
Wednesday, 19 October 2011 14:10

How To Set The Page Title In A Joomla Component

Below is how you set the page title for a Joomla 1.5 component.

With MVC, the standard place to put this code is going to be the view.html.php file inside your view folder.

$document = JFactory::getDocument();
$document->setTitle('Title of Page');

And that is it. Leave the comments below, hope this helped!

Published in Code

Today I want to show you how easy it is to set a redirect in your Joomla Component. Below is the easiest way to go about this.

$app = JFactory::getApplication();
$app->redirect($link, $msg);

You will want to make sure that there are variables set for $link and $msg. Also this is best used with an IF statement. Here is a full example on how to use the redirect.

if($user->guest):
$link = 'index.php';
$msg = 'You are not logged in.';

$app = JFactory::getApplication();
$app->redirect($link, $msg);
endif;
Published in Code

So you want to add a CSS or JS file to your component? Here is how you would do that, the easiest and best practice way.

Published in Code