getDescription in the slide down panel The Next CEO of Stack OverflowBulk update products to include new websitesRecently product view not workingmulti slide for customersMagento catalog Product ListMenu effects slideHow to change dynamic attributes when simple product is selectedSome select options not working in advanced searchAdmin panel is down due to compilation issues. Admin panel is down with 500 errorHow to get active slide id in jQueryExport Category name in xml feed Magento 1.9.2
Find the majority element, which appears more than half the time
What steps are necessary to read a Modern SSD in Medieval Europe?
How should I connect my cat5 cable to connectors having an orange-green line?
Incomplete cube
"Eavesdropping" vs "Listen in on"
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Cannot restore registry to default in Windows 10?
Man transported from Alternate World into ours by a Neutrino Detector
Is it correct to say moon starry nights?
How to pronounce fünf in 45
How to show a landlord what we have in savings?
Is it possible to make a 9x9 table fit within the default margins?
The sum of any ten consecutive numbers from a fibonacci sequence is divisible by 11
Compilation of a 2d array and a 1d array
Is it a bad idea to plug the other end of ESD strap to wall ground?
Car headlights in a world without electricity
Calculating discount not working
Strange use of "whether ... than ..." in official text
Why does freezing point matter when picking cooler ice packs?
Is it OK to decorate a log book cover?
Does int main() need a declaration on C++?
Planeswalker Ability and Death Timing
Shortening a title without changing its meaning
MT "will strike" & LXX "will watch carefully" (Gen 3:15)?
getDescription in the slide down panel
The Next CEO of Stack OverflowBulk update products to include new websitesRecently product view not workingmulti slide for customersMagento catalog Product ListMenu effects slideHow to change dynamic attributes when simple product is selectedSome select options not working in advanced searchAdmin panel is down due to compilation issues. Admin panel is down with 500 errorHow to get active slide id in jQueryExport Category name in xml feed Magento 1.9.2
I am trying to display the description for each product in the slide down panel. I am using a slider to display product images where I have a on hover buttons first one adds the product to basket and the second one triggers the slide down panel. It displays random products description not the one I click on.
<div id="owl-demo" class="owl-carousel">
<?php $categoryId = 4; // this is the category holding your products
$category = Mage::getModel('catalog/category')->load($categoryId);
$products = Mage::getModel('catalog/product')
->getCollection()
->addCategoryFilter($category);
$products->addAttributeToSelect(array(
'image',
'name',
'description',
'short_description',
'sku',
'asin'
))
->addFieldToFilter('visibility', array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
));
//$products->load();
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t1'>
<?php
$description = $product->getDescription();
?>
</button>
</div>
<?php
?>
</div>
<div class="toggles" data-target='t1'>
<p> <?php echo $description; ?> </p>
</div>
I would like to get Description for each products I click on no the same one for all of them.
magento-1.9 product php ce-1.9.0.1 jquery
add a comment |
I am trying to display the description for each product in the slide down panel. I am using a slider to display product images where I have a on hover buttons first one adds the product to basket and the second one triggers the slide down panel. It displays random products description not the one I click on.
<div id="owl-demo" class="owl-carousel">
<?php $categoryId = 4; // this is the category holding your products
$category = Mage::getModel('catalog/category')->load($categoryId);
$products = Mage::getModel('catalog/product')
->getCollection()
->addCategoryFilter($category);
$products->addAttributeToSelect(array(
'image',
'name',
'description',
'short_description',
'sku',
'asin'
))
->addFieldToFilter('visibility', array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
));
//$products->load();
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t1'>
<?php
$description = $product->getDescription();
?>
</button>
</div>
<?php
?>
</div>
<div class="toggles" data-target='t1'>
<p> <?php echo $description; ?> </p>
</div>
I would like to get Description for each products I click on no the same one for all of them.
magento-1.9 product php ce-1.9.0.1 jquery
add a comment |
I am trying to display the description for each product in the slide down panel. I am using a slider to display product images where I have a on hover buttons first one adds the product to basket and the second one triggers the slide down panel. It displays random products description not the one I click on.
<div id="owl-demo" class="owl-carousel">
<?php $categoryId = 4; // this is the category holding your products
$category = Mage::getModel('catalog/category')->load($categoryId);
$products = Mage::getModel('catalog/product')
->getCollection()
->addCategoryFilter($category);
$products->addAttributeToSelect(array(
'image',
'name',
'description',
'short_description',
'sku',
'asin'
))
->addFieldToFilter('visibility', array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
));
//$products->load();
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t1'>
<?php
$description = $product->getDescription();
?>
</button>
</div>
<?php
?>
</div>
<div class="toggles" data-target='t1'>
<p> <?php echo $description; ?> </p>
</div>
I would like to get Description for each products I click on no the same one for all of them.
magento-1.9 product php ce-1.9.0.1 jquery
I am trying to display the description for each product in the slide down panel. I am using a slider to display product images where I have a on hover buttons first one adds the product to basket and the second one triggers the slide down panel. It displays random products description not the one I click on.
<div id="owl-demo" class="owl-carousel">
<?php $categoryId = 4; // this is the category holding your products
$category = Mage::getModel('catalog/category')->load($categoryId);
$products = Mage::getModel('catalog/product')
->getCollection()
->addCategoryFilter($category);
$products->addAttributeToSelect(array(
'image',
'name',
'description',
'short_description',
'sku',
'asin'
))
->addFieldToFilter('visibility', array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
));
//$products->load();
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t1'>
<?php
$description = $product->getDescription();
?>
</button>
</div>
<?php
?>
</div>
<div class="toggles" data-target='t1'>
<p> <?php echo $description; ?> </p>
</div>
I would like to get Description for each products I click on no the same one for all of them.
magento-1.9 product php ce-1.9.0.1 jquery
magento-1.9 product php ce-1.9.0.1 jquery
edited 2 days ago
Teja Bhagavan Kollepara
3,00841949
3,00841949
asked Nov 2 '15 at 12:17
Bako GdaniecBako Gdaniec
1241115
1241115
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
you have to echo description inside the loop. you are echo it outside the so it is showing last description.
$description='';
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t<?php echo $product->getId() ?>'>
<?php
$description .= $product->getDescription().'<br />';
?>
</button>
</div>
<?php
?>
</div>
<?php foreach ($products as $product) ?>
<div class="toggles" data-target='t<?php echo $product->getid()?>'>
<p> <?php echo $product->getDescription(); ?> </p>
</div>
<?php ?>
When I do that the whole slider messes up , as there is only 1 product in the slider and the rest of the products are underneath it. However they display correct description which is a good thing
– Bako Gdaniec
Nov 2 '15 at 12:27
check the update answer...
– Qaisar Satti
Nov 2 '15 at 12:29
The latest edit displays all of the product descriptions at once , when I click the button of the certain product in the dropdown there are all of the descriptions
– Bako Gdaniec
Nov 2 '15 at 12:36
update the answer follow that
– Qaisar Satti
Nov 2 '15 at 12:42
add a comment |
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f88566%2fgetdescription-in-the-slide-down-panel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
you have to echo description inside the loop. you are echo it outside the so it is showing last description.
$description='';
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t<?php echo $product->getId() ?>'>
<?php
$description .= $product->getDescription().'<br />';
?>
</button>
</div>
<?php
?>
</div>
<?php foreach ($products as $product) ?>
<div class="toggles" data-target='t<?php echo $product->getid()?>'>
<p> <?php echo $product->getDescription(); ?> </p>
</div>
<?php ?>
When I do that the whole slider messes up , as there is only 1 product in the slider and the rest of the products are underneath it. However they display correct description which is a good thing
– Bako Gdaniec
Nov 2 '15 at 12:27
check the update answer...
– Qaisar Satti
Nov 2 '15 at 12:29
The latest edit displays all of the product descriptions at once , when I click the button of the certain product in the dropdown there are all of the descriptions
– Bako Gdaniec
Nov 2 '15 at 12:36
update the answer follow that
– Qaisar Satti
Nov 2 '15 at 12:42
add a comment |
you have to echo description inside the loop. you are echo it outside the so it is showing last description.
$description='';
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t<?php echo $product->getId() ?>'>
<?php
$description .= $product->getDescription().'<br />';
?>
</button>
</div>
<?php
?>
</div>
<?php foreach ($products as $product) ?>
<div class="toggles" data-target='t<?php echo $product->getid()?>'>
<p> <?php echo $product->getDescription(); ?> </p>
</div>
<?php ?>
When I do that the whole slider messes up , as there is only 1 product in the slider and the rest of the products are underneath it. However they display correct description which is a good thing
– Bako Gdaniec
Nov 2 '15 at 12:27
check the update answer...
– Qaisar Satti
Nov 2 '15 at 12:29
The latest edit displays all of the product descriptions at once , when I click the button of the certain product in the dropdown there are all of the descriptions
– Bako Gdaniec
Nov 2 '15 at 12:36
update the answer follow that
– Qaisar Satti
Nov 2 '15 at 12:42
add a comment |
you have to echo description inside the loop. you are echo it outside the so it is showing last description.
$description='';
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t<?php echo $product->getId() ?>'>
<?php
$description .= $product->getDescription().'<br />';
?>
</button>
</div>
<?php
?>
</div>
<?php foreach ($products as $product) ?>
<div class="toggles" data-target='t<?php echo $product->getid()?>'>
<p> <?php echo $product->getDescription(); ?> </p>
</div>
<?php ?>
you have to echo description inside the loop. you are echo it outside the so it is showing last description.
$description='';
foreach ($products as $product)
?>
<div class="item">
<img class="lazyOwl" src="<?php echo $localHelper->getImageUrl($product); ?>" alt="img" />
<button type="button" title="<?php echo $this->__() ?>"
class="addp" onclick="setLocation
('<?php echo Mage::helper('checkout/cart')->getAddUrl($product) ?>')">
<span><span><?php echo $this->__() ?></span></span></button>
<button type="button" class="info" data-target='t<?php echo $product->getId() ?>'>
<?php
$description .= $product->getDescription().'<br />';
?>
</button>
</div>
<?php
?>
</div>
<?php foreach ($products as $product) ?>
<div class="toggles" data-target='t<?php echo $product->getid()?>'>
<p> <?php echo $product->getDescription(); ?> </p>
</div>
<?php ?>
edited Nov 2 '15 at 12:42
answered Nov 2 '15 at 12:19
Qaisar SattiQaisar Satti
27k1256109
27k1256109
When I do that the whole slider messes up , as there is only 1 product in the slider and the rest of the products are underneath it. However they display correct description which is a good thing
– Bako Gdaniec
Nov 2 '15 at 12:27
check the update answer...
– Qaisar Satti
Nov 2 '15 at 12:29
The latest edit displays all of the product descriptions at once , when I click the button of the certain product in the dropdown there are all of the descriptions
– Bako Gdaniec
Nov 2 '15 at 12:36
update the answer follow that
– Qaisar Satti
Nov 2 '15 at 12:42
add a comment |
When I do that the whole slider messes up , as there is only 1 product in the slider and the rest of the products are underneath it. However they display correct description which is a good thing
– Bako Gdaniec
Nov 2 '15 at 12:27
check the update answer...
– Qaisar Satti
Nov 2 '15 at 12:29
The latest edit displays all of the product descriptions at once , when I click the button of the certain product in the dropdown there are all of the descriptions
– Bako Gdaniec
Nov 2 '15 at 12:36
update the answer follow that
– Qaisar Satti
Nov 2 '15 at 12:42
When I do that the whole slider messes up , as there is only 1 product in the slider and the rest of the products are underneath it. However they display correct description which is a good thing
– Bako Gdaniec
Nov 2 '15 at 12:27
When I do that the whole slider messes up , as there is only 1 product in the slider and the rest of the products are underneath it. However they display correct description which is a good thing
– Bako Gdaniec
Nov 2 '15 at 12:27
check the update answer...
– Qaisar Satti
Nov 2 '15 at 12:29
check the update answer...
– Qaisar Satti
Nov 2 '15 at 12:29
The latest edit displays all of the product descriptions at once , when I click the button of the certain product in the dropdown there are all of the descriptions
– Bako Gdaniec
Nov 2 '15 at 12:36
The latest edit displays all of the product descriptions at once , when I click the button of the certain product in the dropdown there are all of the descriptions
– Bako Gdaniec
Nov 2 '15 at 12:36
update the answer follow that
– Qaisar Satti
Nov 2 '15 at 12:42
update the answer follow that
– Qaisar Satti
Nov 2 '15 at 12:42
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f88566%2fgetdescription-in-the-slide-down-panel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown