i need to know how i can change the behavour of the "click event" on magento when i click on a product. Like, instead of showing its details, do somethign else. Going to page x or alert soemting, i dont care, just need some starting help on that. :) in details, i need to get lightbox instead of the details page. but imn new to magento and dont know where to start.
thanks :)
It looks like you want to execute something on the existing page, as opposed to redirecting the page to some alternative location. To do that, just add some JS to the page that intercepts the click event and performs whatever action you want. You could put this into your own JS file and load it on the product list page like this (local.xml):
<catalog_product_list>
<reference name="head">
<action method="addJs"><script>path/to/your/script.js</script></action>
</reference>
</catalog_product_list>
Hope that helps!
Thanks,
Joe
Related
I'm facing one issue on magento2.
I have created one CMS page and want to display current CART items on cms page.
So i have created on test.phtml file and call from CMS page.
{{block class="Magento\Framework\View\Element\Template" cacheable="false" template="Magento_Theme::test.phtml"}}
Whatever i have written in test.phtml file will only display if i'll clean my cache. It's not display directly if i'll update anything.
I have already written cacheable="false" but it's not working.
Can anyone please help.
Thanks in advance.
Thanks,
I just started working on magento/admin. I am trying to show my static block in one of my CMS pages, but it is not working. I tried to find out answer in google and stack exchange but no luck! Can anyone please help.Thanks.
Below are details:
This is my static block
This is my CMS page: I am able to see the text "Yes!" though.
Final output: That blue box is my CSS. (jfyi).
If you use the latest Magento version 1.9.2.2 that includes the latest patches, then you need to add first the block to Magento white list in teh backend: System->Permissions->Block.
See this article: http://www.dudesquare.nl/blog/2015/10/31/static-block-shortcodes-not-working-1-9-2-2/
Please set different identifier in static block than CMS page. I think CMS page and block identifier same so may be block not display on CMS page.
Also select all store views in static block may be your store is wrong.
And finally remove all cache and refresh all index.
Please check following:
Whether you had editor enabled, while calling static block. If yes, please click on Show/Hide Editor button and check what code is there in text area while editor mode off.
If above does not work, then go to System >> Configuration >> Advanced (Developer) and under Log Settings, Enable Logs. Then refresh cms page in frontend.
I hope this will help you resolve your issue. Please let me know if you find any problem.
Try to add static blocks through Layout Update XML in CMS Pages use something like this code. Add this code in your CMS page design tab.
<reference name="content">
<block type="cms/block" name="block.name">
<action method="setBlockId">
<block_id>block_id</block_id>
</action>
</block>
</reference>
Solution:
Step 1)Go to admin.
Step 2)Open Top menu System->Permissions->Blocks.
Step 3)click "Add New Block".
write your "Block Name" and Is Allowed "Yes".
Note: Block Name is type of your block for example "cms/block"
after Save Block.
Step 4)Clear cache and refresh front page. Now Block is showing.
Done.
I need some help tracing back a change i made early on when learning Magento.
On the product page i've removed the part that would normally display the availability, either "In Stock" or "Out of Stock".
I've checked the /catalog/product/type/default.phtml and i've not commented this section out, which seems to be the usual way of fixing it.
I seem to recall i changed something in the admin panel but buggered if i can find anything relating to this.
Can anyone advise on tracing the function back? i presumed it should be seen in /catalog/product/view.phtml but i cannot see anything in there for my template or the base template.
Magento version 1.7.0.2
Forever greatful if anyone can help me figure out what i've done!
Thanks,
May be you have deleted this line from your view.phtml file
<?php echo $this->getChildHtml('product_type_data') ?>
this in turn call this block
<block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
This is responsible for display stock message on product page.
I want to best rated product on a magento homepage. I have product reviewing module configured on my site.
i have tried following this http://www.odino.org/84/retrieve-top-rated-products-in-magento
but am unable to get it working.
My homepage is formed my calling one block from the cms home page {{block type="page/html" template="page/html/home.phtml"}}
and i have tried putting the php code in home.phtml
The link i have posted asks to create a helper, but i don't know how to go about that, so what i did was wrote a normal function within the page and called it.
Any help would be seriously appreciated :)
Thanks
Look at this module from Inchoo, explained with all the required changes you need to make with screenshots. Hopefully this will be helpful
http://inchoo.net/ecommerce/magento/bestseller-products-in-magento/
In my CMS contact-us page, I have the following code:
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
Which pulls in Magento's standard Contact Form. I have installed a new module from Fontis called recaptcha to prevent spam. This is located my_theme/default/template/fontis/recaptcha/contacts.phtml.
Is anyone able to tell me how I correctly modify the above code to use the new form please?
I have tried changing: template="contacts/form.phtml" to template="fontis/recaptcha/contacts.phtml" but this doesnt seem to work, not sure if I need to alter the block type to make it work.
Thanks in advance for any help
John
Your modification is generally correct to change a template path. Specifically, what do you mean when you say it "doesn't" work? Without more information on what you're seeing, it's difficult to help you debug this issue.
Thanks!
Joe
Sounds like a caching issue to me, or that you're changing the template on the wrong declaration. First, turn off all caching on your site and try again. If that doesn't work, turn on template path hints and make sure that you are editing what you think you are.