Skip to main contentSkip to footer

E-commerce Module: Replace of fancy box in Opencart with the color box

Rupak Nepali
Share:
E-commerce Module: Replace of fancy box in Opencart with the color box

I love the opencart but I am worried using the fancy box for image enlargement in the product details page, so I think to change the way to show the image enlargement with the use of the color box.

Download the following zip files, upload those files and folders in the root folder like in the image below:

download button

colorbox-in-opencart
colorbox-in-opencart

Go to the catalog/view/theme/default/template/product.tpl and place the code below, below the <?php echo $header; ?>

<link rel="stylesheet" href="colorbox.css" /> <script src="colorbox/jquery.colorbox.js"></script> <script> $(document).ready(function(){ $(".group1").colorbox({rel:'group1'}); $("#click").click(function(){ $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here."); return false; }); }); </script>
module for free in opencart, image magnification
module for free in opencart, image magnification

Now find “facybox” and replace with the “group1” and save, then bingo, things works.

fancy color box for opencart
fancy color box for opencart

Features of ColorBox

  • Supports photos, grouping, slideshow, ajax, inline, and framed content.
  • Lightweight: 10KB of JavaScript (less than 5KBs gzipped).
  • Appearance is controlled through CSS so it can be restyled.
  • Can be extended with callbacks & event-hooks without altering the source files.
  • Completely unobtrusive, options are set in the JS and require no changes to existing HTML.
  • Preloads upcoming images in a photo group.

Find out the example how the colorbox works out as the fancy box with some extra things.

http://www.jacklmoore.com/colorbox/example3/

Comments

Join the conversation and share your thoughts

Leave a Comment

Your comment will be reviewed before publishing.

Be the first to comment on this post!

Innovation

Let's Make Something Amazing Together

We always provide our best creative ideas at the highest level. Tell us about your project and we will make it work.

InnovateBringing innovative solutions to complex problems
AutomateStreamlining processes through automation
DominateLeading the market with exceptional results
Build Smarter and Launch FasterEfficient development for rapid deployment