How to change source of image in magento - magento

Please tell me how to change the image source in magento dynamically.say I want that after every 10 seconds I want to change the source of image.
now I have define a static block which contain image src with id banner..
now my question is where should I define for changing the image source and how to change the source.

I would suggest looking into a jQuery based image rotator. There are some simple examples out there such as this one:
http://burnmind.com/tutorials/how-to-create-a-simple-automatic-image-rotator-using-jquery
Also be careful not to cause conflicts with jQuery and Prototype. You can use this method to avoid this from happening.

Refer to these links: They are free extensions which may serve your purpose.
http://expertmagentodevelopers.wordpress.com/2012/04/24/download-magento-banner-slider-extensions-free/
http://www.magentocommerce.com/magento-connect/banner-slider-3912.html
http://www.magentocommerce.com/magento-connect/Interakting.com/extension/2255/interakting-slider#overview

Related

Load all images for product without resizing in opencart 2.x

I'm trying to load all images in the product page , but i don't want to resize them.
Does anybody know a simple solution tot do that?
The opencart version is 2.1.0.2
In-order to retrieve images without being re-sized on the product page, you need not re-size the images in the product controller file.
So in the Product Controller File, locate that in /catalog/controller/product/product.php
In the public function index()
Look out for $this->model_tool_image->resize remove the function call and use the link to the image instead to return to the template HTTPS_SERVER . 'image/'. $image_variable provided HTTPS_SERVER is defined in /config.php
Note: $image_variable could be $product_info['image'] or $result['image'] , use your best judgement.
Tip: Use vqmod as you would be modifying the core controller file
In order to use vQmod (according to the process described previously), you can take a look to this method for working with real images instead of thumbnails.
Note that there are other possible suggestions, such as:
OCmod which can be found here
Image Autosize extension which can be found here

Joomla - use full article image instead of intro image

I wanted to ask if there is a possibility to force Joomla to use full article image if intro image is empty (everywhere where image should be visible).
Is there a setting for this? Is it a feature of a template or Joomla engine itself? Right now I always have to specify both of this images, cause if I specify one only full article image Joomla does not display miniature in many places. If I specify the other one miniature is there but when I enter article it is missing.
I always end up having to specify the same image twice. Is there any way around this?
Thanks
UPDATE1:
I ended up overwriting the template for article to display $images->intro_image whenever $images->image_fulltext is not available.
This solves my problems yet one joomla user tells me she is sure that they were able to do that before without any modifications in the template. So now I'm just wondering if there is a setting for this in Joomla Admin so that it does not have to be forced in template code
It turned out that each element of my page except full article used intro_image. So what I did was to copy out the part responsible for showing article into the html folder of my template and just added a php code to use intro image instead of fulltext image (if it is present). You basically need to change $image->fulltext to $image->intro_image in the condition. But remember to keep the original condition as an elseif condition if you want to be able to still use full text image

Use Grunt to make DOM changes

So I want to use Lazysizes (lazy loading responsive images). Included in my Grunt stack is Responsive Images Extender, which outputs responsive image code (srcset) from simply including an "img" tag with a "src" attribute. Lazysizes requires the "data-srcset" attribute in replace of the "srcset" attribute, however. I added a script to my page that changes the "srcset" attributes to "data-srcset" attributes, but this isn't ideal as images are are already downloaded at runtime. It would be ideal if I could change the tags with Grunt, as there is no advantage in changing them live.
This seems like a very common thing, but I cannot find a good way to do it. String replace doesn't seem like an ideal solution, since it can cause problems if I ever use "srcset=" in my code.
I gave the grunt-responsive-images-extender a major makeover and added the possibility to change the attribute name of srcset to anything you want (data-srcset in your case) via the srcsetAttributeName option.
There is a grunt tans called dom_munger. With dom_munger you can change HTML attributes and do a lot of interesting stuff; however I cannot find a way to change an attribute name to another thing. Perhapse you can have a better luck checking it.

resize default magento 1.7 product image

I have tried everything I could to change the default product size of magento please any help?
I need this to be bigger http://officeresourcegroup.com/new/desks/dmi/dmi-andover-series.html
You need to edit media.phtml in your theme. There is a resize call that makes the images 265x265.
here is a path for the file in base package, please exchange with your theme directories:
/app/design/frontend/base/default/template/catalog/product/view/media.phtml
look for the line:
$this->helper('catalog/image')->init($_product, 'image')->resize(265)
You need change this: $this->helper('catalog/image')->init($_product, 'image')->resize(265);
I think you are using an external module for the Zoom image, correct? Soon you should change the media.phtml this module. Look in the app/design/frontend/default/default/template/(extension-folder-zoom)/media.phtml or app/design/frontend/base/default/template/(extension-folder)/media.phtml. Note that (extension-folder) is the module name that you used.
Should you not find anyway, maybe the html is generated in the controller module, but usually not this way.
Another way to figure out which file you should use is the option to debug screens. Watch this video and will not doubt how:
http://www.youtube.com/watch?v=E4GLjYHaJig

Unifying image management (ImageField vs. TinyMCE) in Plone

Does there exist anything akin "UberSelectionWidget for images?" I'd like to get rid of direct-upload image fields and make all images to be managed through an image bank folder.
1) In all use cases upload image to image-bank folder first
2) Pick image from the folder by using some sort of image friendly selection widget (both Archetypes, Dexterity)
This way adding images would be unified within TinyMCE editor and news content items.
The problem, however, is that I cannot find any examples for reference picker for images solution.
Please see also Making TinyMCE image pick dialog point to a default folder on Plone
I am willing to replace News Item with my own content type just to get around this problem.
This product helped me in a Plone 3 project:
http://plone.org/products/upload-reference-widget
I had to customize it a little but I think it's a good base to start with.
No Dexterity support IIRC.
Use ReferenceField instead of ImageField in your content types, it make the job done.
You can extend 'News Item' type by using schemaextender.
Bonus:
But asking for people to first add image before adding a news is weird. As widget you must use uploadreference widgets for archetypes as mentionned by marcosfromero . It works and let you add an images without going away of your addform.
I'm not sure but there is no z3cform widget at the moment to achieve this (upload & create ref), may be someone can create it or get me wrong ?

Resources