You need to make sure the call to the addAttributeToSelect()
method against the product collection is adding your attribute.
->addAttributeToSelect('some_attribute', 'bogof')
or even just use *
to select all attributes (although you may not want to do this in practice dependant on the number of attributes you have):
->addAttributeToSelect('*')
I would suggest looking at what is returned from Mage::getSingleton("catalog/config")->getProductAttributes()
to make sure bogof
isn't already included and if it isn't you can likely just add it in. This will make the attribute data available to the product loaded from the collection.
Make sure to setup your cookie domain name exactly same as how you access from browser(with or without www) And check the following settings in
Magento admin under System > Config > Web
And update like following
Cookie Lifetime: 33600
Cookie Path: /
Cookie Domain: www.yourdomainname.com
Use HTTP Only: No
Cookie Restriction Mode: No
This should fix your problem(Clear your browser cookie for one last time and check)
If this doesn't work still your server environment and session/cookie saving doesn'tmatch like magento needed. So you may need to un-comment domain settings in
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
Around #95 from
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
To
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
// 'domain' => $cookie->getConfigDomain(),
// 'secure' => $cookie->isSecure(),
// 'httponly' => $cookie->getHttponly()
);
Note:
You can extend this core file to your local and do this and you need to uncomment only the domain,secure,http params not entire cookie params.
Best Answer
use following & let me know: