This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.human-element.com/form-validation-the-magento-way/ | |
Notice the | |
class="input-text required-entry" | |
that’s what prototype looks at to determine whether or not to validate the field. This can be taken further than just “is there stuff in the field?” (required-entry) to maybe something like “are there only numbers in the field?” or “are there only 5 numbers in the field?” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://connect20.magentocommerce.com/community/Foundation_CustomizableFraudFilters | |
<reference name="product.info"> | |
<block type="page/html_pager" name="product_review_list.toolbar" /> | |
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" /> | |
<block type="review/product_view_list" name="product_customer_reviews" as="product_customer_reviews" template="review/product/view/list.phtml"> | |
<block type="review/form" name="product.review.form" as="review_form"> | |
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label"> | |
<label>Review Form Fields Before</label> | |
<action method="setMayBeInvisible"><value>1</value></action> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The file you're looking for is: | |
/app/code/core/Mage/Page/Block/Html/Pager.php | |
The line you want to modify to adjust review pagination limits is this one: | |
protected $_availableLimit = array(10=>10,20=>20,50=>50); | |
Replace the numbers with the review page limits that you'd prefer. | |
Of course, since this change is in core code, you'll first want to copy this file into /app/code/local/Mage/Page/Block/Html, and then make your change, to ensure that upgrades do not override it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you are looking to add magento reviews form to your product details form page, here is the step by step instructions for that. | |
Second, open: catalog.xml, in your “layout” directory. Find this section: | |
? | |
1 | |
2 | |
<reference name=”content”> | |
<block type=”catalog/product_view” name=”product.info” template=”catalog/product/view.phtml”> | |
Add the following: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<reference name="product.info"> | |
<block type="page/html_pager" name="product_review_list.toolbar" /> | |
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" /> | |
<block type="review/product_view_list" name="product_customer_reviews" as="product_customer_reviews" template="review/product/view/list.phtml"> | |
<block type="review/form" name="product.review.form" as="review_form"> | |
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label"> | |
<label>Review Form Fields Before</label> | |
<action method="setMayBeInvisible"><value>1</value></action> | |
</block> | |
</block> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How do I implement Ajax/JQuery to an existing PHP MYSQL pagination script? | |
up vote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pagination Tricks in Magento – Part 1 | |
March 11, 2013 by Peter | |
Share: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ajax paging in magento for custom module | |
February 14, 2015magentopractice | |
Today I have implemented Ajax paging in magento frontend. Please take a look it may help you. | |
Block file … | |
class Namesapce_ModuleName_Block_Productlist extends Mage_Core_Block_Template | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir demo | |
cd demo | |
wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz | |
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz | |
tar -zxvf magento-1.8.1.0.tar.gz | |
tar -zxvf magento-sample-data-1.6.1.0.tar.gz | |
mv magento-sample-data-1.6.1.0/media/* magento/media/ | |
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql | |
mv magento/* magento/.htaccess . | |
chmod o+w var var/.htaccess app/etc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Magento observer examples | |
When it comes to customize the magento code, there are following 4 options: | |
1. Creating a observer should be the first to consider. | |
2. Extending and overriding the core modules should be the second to consider when option 1 cannot fails to accomplish the objectives. | |
3. Copy the core class to the local directory and put it in the same directory path it was in core directory, this is should be avoided. | |
4. Modify the core class directly, this should definitedly be avoided unless you are just trying to test a code snippet. | |
So, there are really only two recommended options which is to try to create an observer first, if it doesn’t work out then write a module to extend and override the core module. | |
Here is an example of how to create an observer in Magento. This module has two observer: |