Problem: I placed an order in Magento using Paypal payment method. Everything went fine. I was able to pay through Paypal. However, when I login to the shop as a customer, I see that ‘My Orders‘ section is empty. I could not find information of the order I recently placed.
Cause: Your order status might be either ‘Pending‘ or ‘Pending Payment‘. By default, Magento doesn’t allow these two types of orders to be displayed in customer’s end. Solution:
dd the following code inside global element of app/etc/local.xml
<sales>
<order>
<states>
<pending translate="label">
<label>Pending</label>
<statuses>
<pending default="1"/>
</statuses>
<visible_on_front>1</visible_on_front>
</pending>
<pending_payment translate="label">
<label>Pending Payment</label>
<statuses>
<pending_payment default="1"/>
</statuses>
<visible_on_front>1</visible_on_front>
</pending_payment>
</states>
</order>
</sales>
Note: Core file containing this data is app/code/core/Mage/Sales/etc/config.xmlNow, your customers should be able to view their orders which have ‘pending’ or ‘pending payment’ status.
Magento default have a cron.php file located in the root directory. To set a cron in magento you have to create your own module first, and in the config.xml you have to declare the method which will fired and the time. Below is a dump of a etc/config.xml file of a custom cron module <?xml version="1.0"?> <config> <modules> <Wl_Cronset> <version>0.1.0</version> </Wl_Cronset> </modules> <crontab> <jobs> <Wl_Cronset> <schedule> <cron_expr>01 00 * * *</cron_expr> </schedule> <run> <model>cronset/expired::productExpired</model> </run> </Wl_Cronset> </jobs> </crontab> <global> <models> <cronset> <class>Wl_Cronset_Model</class> </cronset> </models> </global> </config>
As per mentioned in this xml your cron will be fired every day @ night 00:01 min
Now you have to write your own functionality in your module Model file, Here my model file name is Expired and the function which will trigger is productExpired().
<?php class Wl_Cronset_Model_Expired extends Mage_Core_Model_Abstract { public function productExpired() { // Your code goes here } } ?>
Now login to your server to call the magento root cron.php and set to be fired in every minute.
into the page.xml which is inside Yourapp/design/Frontend/base/default/layout/Page.xml (in Magento 1.4.0.0 or Higher version of Magento). If you want to add a javascript then you can directly write that code into your header.Phtml file which is in theapp/design/frontend/base/default/template/page/html/header.phtml .Open the file and write
To use Css Class in an HTML Tag we can use a Jquery function addClass(). This function add a css class into your HTML tag.The most intresting things is that you can use this class on a eventhandler also, To get effects when a client/user response on it.
This is an example to add a css class into a Html Tag