Practical Web Applications for Daily Living…
Ecommerce Consultants based in Singapore
Sep 6th
I am trying this keyword if I will be index if somebody search for Ecommerce Consultant base in Singapore, well.. actually yes, we are one of the best ecommerce consultants in Singapore, we design, develop and deploy your ecommerce system in ourr secure web servers. Need ERP? you’ve landed on the right page. Please drop me an email or visit Entrust Network Services Pte Ltd for more information.
Code Igniter Ajax Form
Sep 5th
$j(document).ready(function(){
$j("form").submit(function(e) {
e.preventDefault();
$j.post("/index.php/home/submitmessage", { firstname: $j("#firstname").val(), lastname: $j("#lastname").val(), address: $j("#address").val(), email: $j("#email").val(), confirmemail: $j("#confirmemail").val() , telephone: $j("#telephone").val(), mobile: $j("#mobile").val(),message: $j("#message").val() }, function (data) {
alert(data);
});
});
});
in application/config/constant
define(‘IS_AJAX’, isset($_SERVER[‘HTTP_X_REQUESTED_WITH’]) && strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) == ‘xmlhttprequest’);
in the controller
{
//load form validation
$this->load->library(‘form_validation’);
//set form rules
$this->form_validation->set_rules(‘firstname’, ‘Firstname’, ‘required’);
$this->form_validation->set_rules(‘lastname’, ‘Lastname’, ‘required’);
$this->form_validation->set_rules(‘email’, ‘Email’, ‘required|valid_email|matches[confirmemail]‘);
$this->form_validation->set_rules(‘confirmemail’, ‘Confirm Email’, ‘required|valid_email’);
$this->form_validation->set_rules(‘address’, ‘Address’, ‘required’);
$this->form_validation->set_rules(‘message’, ‘Message’, ‘required’);
//run form validation
$success = $this->form_validation->run();
//set username variable
$firstname = $this->input->post(‘firstname’);
$lastname = $this->input->post(‘lastname’);
$email = $this->input->post(‘email’);
$address = $this->input->post(‘address’);
$message = $firstname." ".$lastname."\n";
$message .= "Tel:".$this->input->post(‘telephone’)." | Mobile:".$this->input->post(‘mobile’)."\n";
$message .= $address."\n";
$message .= $this->input->post(‘message’);
$msg = $message;
//if the validation was a success
if ((IS_AJAX && $success) || (!IS_AJAX && $success)) {
$this->load->library(‘email’);
$this->email->from($email, $firstname." ".$lastname);
$this->email->to(‘juliusbacosa@gmail.com’);
$this->email->subject(‘Message from Weekee’);
$this->email->message($msg);
$this->email->send();
echo "Congradulations {$firstname}, your form was accepted!";
}
//if validation failed
else { echo strip_tags(validation_errors()); }
}
Copy and Paste Now!!!!
Magento Upsell (we also recommend) not showing solved
Sep 3rd
After trying almost everything from checking the javascripts codes, php codes, to trial and error delete and pasting back xml elements in catalog.xml to what ever possible solution I can think of, showing a lost We also Recommend tab is just a click of a button, I never expect to reindex the whole database after your first installation and I didn’t receive any warning that I should re index my whole system. I lost 5 hours just to learn a mistake, if something weird is happening to your magento data, please try to re index the system first before you touch any codes…
Ecommerce System Installation Singapore
Sep 3rd
We have successfully installed 10 ecommerce shops within 4 months using magento ecommerce system, having different business requirements gives pain during the development, but now, we are very proud to say, we know magento ecommerce system enough that we can cater the enterprice level already. We are moving towards integrating magento to other business software models like CRM and more advanced ERP systems. byeee.!!!
JQUERY JSON Codeigniter
Sep 3rd
Jquery snippet to call a method with a json p=output
jQuery.getJSON("index.php/welcome/jjson/", function(json){
jQuery(‘#json’).html("<a href=’http://www.google.com’ target=’_blank’>" + json.glossary.title + "</a>:"+ json.glossary.GlossDiv.title + ":" + json.glossary.GlossDiv.GlossList.GlossEntry.ID);
});
});
where
json.glossary.GlossDiv.title
is the from json = the variable containing the data
glossary = is an array item from the json data
Glossdiv… etc…
here is the controller that writes this data.
{
$results[‘jsonx’] = ‘{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
},
"GlossSee": "markup"
}
}
}
}
}’;
$this->load->view(‘Json_record’,$results);
}
then the view to render the data.
Jquery Developers Singapore or simply Jquery Singapore
Sep 2nd
Having a stable ecommerce system like magento in my arsenal which we are selling like hot cakes to SME companies here in singapore, I am now equipping and wants to go deeper to user interface design not only in Ecommerce website but for all types of applications residing in browsers. I am so sleepy right now so maybe I have to sleep, zend framework and code igniter? … well these looks will only be called if there is a need for very customize web app, magento and wordpress is feeding me right now and also joomla, I never knew joomla could generate so much food… well for asp.net mvc… I still love its potentials… but right now I am going towards opensource technologies so all the experience and disciplines I have in the .net world are still very useful especially the MVC pattern… For server side frameworks.. spring mvc, zend framework and code igniter… for front end? if I code the project from scrath then I will definitely choose jquery, but for out of the box web apps… I can take prototype and primitive javascript… scriptalicious? mmm I haven’t digested it yet… so got to sleep…. hoping for a jquery developer singapore show down….
Javascript Cute Exam
Sep 2nd
Somebody called me today asking how good I am in Javascript, well… javascript is a side dish for server side programmers and especially for mash up developers like myself, so that question make me think.. yeahh.. how good am I in JavaScript, so I tried to find some online exam to test myself how good really am I in javascripting even though its not my primary weapon in web development industry… , fortunately… I did the exam well… so now I am looking for more advanced exam…
Jquery Ajax Codeigniter
Sep 1st
In your View
<script type="text/javascript">
$.noConflict();
jQuery(document).ready(function($) {
jQuery(‘#x’).click(function(){
jQuery("#content").empty().html(‘<img src="http://juliusbacosachronicles.com/wp-content/themes/mystique/images/workstation.jpg" />’);
var num = 8;
jQuery(‘#content’).load("index.php/welcome/jajax/"+num,function(str){});
});
});
// Code that uses other library’s $ can follow here.
</script>
then the div to hold the content
In your Controller
{
parent::Controller();
$this->load->helper(‘url’);
}
function index()
{
$this->load->view(‘welcome_message’);
}
function jajax($num)
{
$results[‘xxx’] = $num*111;
$this->load->view(‘Ajax_record’,$results);
//get the record from the database
}
then for the view Ajax_record
Retrieving data from Model and accessing the database is still the same.
Byeee….
Setting Up Contact Form within Static Block in Magento
Aug 31st
Just put this within your static block
<ul>
<li>
<div class="input-box">
<div><label for="name">Name <span class="required">*</span></label> <input id="name" class="required-entry input-text" title="Name" name="name" type="text" /></div>
<div class="input-box"><label for="email">Email <span class="required">*</span></label></div>
<div><input id="email" class="required-entry input-text validate-email" title="Email" name="email" type="text" /></div>
<div class="input-box"><label for="telephone">Telephone</label><br /> <input id="telephone" class="input-text" title="Telephone" name="telephone" type="text" /></div>
<div class="input-box"><label for="comment">Comment</label><br /> <textarea id="comment" class="input-text" style="height: 150px; width: 525px;" title="Comment" cols="50" rows="5" name="comment"></textarea></div>
</div>
</li>
</ul>
</fieldset>
<div class="button-set">
<p class="required">* Required</p>
<input id="hideit" style="display:none !important;" name="hideit" type="text" /> <button class="form-button"><span>Submit</span></button></div>
</form>
<script type="text/javascript">// <![CDATA[
var contactForm = new VarienForm(‘contactForm’, true);
// ]]></script>
And adding fields just put normal fields like how to do it in normal html forms,
then add the variables in the Email Template that you will be using
which can be found at system>email transaction>
next thing is to go to system>Generals>Contacts> setup where the email should be sent.
Changing Style of Parent Element of an HTML form input with Javascript
Aug 29th
The html input is a checkbox, I want to let the li be in highlight mode if the checkbox is checked.
<input type="checkbox" name="dishs[]" value="<?php echo $listdish[‘dish_name’]; ?>" onclick="checktolimit(this);"> <?php echo $listdish[‘dish_name’]; ?>
</li>
The javascript for this is.
if(obj.checked){
obj.parentNode.className=’selectactive’;
}else{
obj.parentNode.className=’selectnotactive’;
}
}
where selectnotactive and selectactive are class names in your style.css or whatever you call it.
Sleeping in 3,2,1…

