My recent Project now deals with ubercart: a shopping cart for drupal. This simple snippet will show you how to theme/customize your cart form like removing unnecessary data,fields,colums or text.
this snippet requires the knowledge about form_alter hook and getting the form_id. The handy form_alter is a great hook for this see my example code below.
<?php
function MYMODULENAME_form_alterer_form_alter(&$form, $form_state, $form_id){ switch ($form_id) { // This is our form ID. case 'uc_cart_view_form':
Suppose you would like to delete a file or directory to ease some time.
let’s start with locating our folder, our folder is inside My Documents we will name this deletethisfolder
open your cmd, then locate your folder.
Follow this path in your cmd
C:\Documents and Settings\admin> cd “My Documents”
Press Enter,
C:\Documents and Settings\admin\My Documents>rmdir /s /q
ex.
C:\Documents and Settings\admin\My Documents>rmdir /s /q “C:\Documents and Settings\admin\My Documents\deletethisfolder”
"Unable to send e-mail. Please contact the site administrator if the problem persists."
after i completed my payment from paypal sandbox i got this error messages.
What I did is I just configured the my contact details
http://www.example.com/admin/store/settings/store/edit
that's it! and this solves my problem above.
hope this helps!
taken from Ubercart PayPal sandbox setup
PayPal sandbox preface:
<?php
function MODULENAME_form_alter(&$form, $form_state, $form_id){
global $user;
switch ($form_id) {
// This is our form ID.
case 'YOUR_NODE_FORM_ID': // like page_node_form(for node/add/page)
$form['buttons']['submit']['#submit'][] = 'redirect_this_form';
break;
}
}
function redirect_this_form($form, &$form_state) {
if ($form_state['nid']) {
$node = node_load(array('nid' => $form_state['nid']));
switch($node->type) {
case 'page':
Please refer to this URL (http://drupal.org/node/134425)
Whenever you encountered this in your webserver/webhost just add this in your .htaccess file
php_value memory_limit 16M
just load the url helper
example:
class Welcome extends Controller { public function __construct(){ parent::Controller(); } function index(){ //$this->config->load('config.php'); $this->load->helper('url'); $this->load->view('welcome_message'); }}
this snippet enables you to create a image link
<?php
print l('<img src="'.path_to_theme().'/images/icons/page/hris.png" alt="Business Package - Human Resource Information System (HRIS) " class="business_package_images" />','solutions/hris_ja',array('html' => TRUE));
?>
notice there are 3 parameters: l(1st_param,2nd_param,3rd_param);
1st_param: the html image
2nd_param: the url/path
3rd_param: enable html to TRUE
a