Archive for the ‘Code Labs’ Category


PHP: function of url exists

center

Check if a URL exists.

Read More »

  • Share/Bookmark

PayPal Shopping Cart HTML Code

center

When a buyer clicks the “Add to Cart” button, a new window will appear listing the contents of the buyer’s PayPal Shopping Cart, including the item just added. To make the purchase, the buyer clicks “Checkout” from this window.
Read More »

  • Share/Bookmark

Toggle DIV – Show / Hide

center

Toggle function
takes the ID of the element to toggle
To hide an element, you just set display to ‘none’.
Read More »

  • Share/Bookmark

Form Submit onChange

center

Form Submit onChange select without the submit button.

Using the onchange=”this.form.submit();” on your select.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Read More »

  • Share/Bookmark

Magento Commerce: How to change configuration

Jdam

Mostly new user to magento commerce encounter problem on migration or switching to new database.

Here is some tips how to avoid that:
1. Always backup your database.
2. Make sure you know what your doing. Consult to Magento forums if needed.
3. Go to app/etc/local.xml, look for this code
Read More »

  • Share/Bookmark

Using window.onload

center

Toggle function
takes the ID of the element to toggle
To hide an element, you just set display to ‘none’.
Read More »

  • Share/Bookmark

Codeigniter: Get the last row of table

center

         // you can use the where clause
         $this->db->where('field1', 'string');
         $query = $this->db->get('tabledb');
         // Returns the "last" row
         $last = $query->last_row('array');
         // retrieve last inserted id from table
         $last_id = $last['id'];
  • Share/Bookmark

PHP: in_array – Search Array

center

Apply the in_array function to check the presence of an element.
in_array function will return True or False based on the presence of the search element.
Read More »

  • Share/Bookmark

Pagination Class – Codeigniter

center

Hello everyone!
CodeIgniter’s Pagination class is very easy to use. I set up following code.

Create this file Pagination.php in the system/libraries/Pagination.php folder
Read More »

  • Share/Bookmark

Text in the Tooltip

center




This is an Ajax tooltip script.
When your mouse over the “text” below, ajax will show tooltip from the tag title caption with an image background.

Read More »

  • Share/Bookmark
Page 1 of 212»