Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Will module disappear when read more is clicked?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Will module disappear when read more is clicked?

Will module disappear when read more is clicked? 12 years, 11 months ago #11

Hi Have the virtue mart Slick Slider and it looks nice and I believe it will work but there are two things that I would like it to do. One is have an option to resize the images but not constrain them to the sizes I input so they do not appear squashed or stretched but maintain their aspect ratio...is there a way to do this? I tried to leave one field blank but it did not work.

The second problem is that when you click read more it takes you to the item info which is good but I would like the module to disappear because of limited real estate on the screen...is there a way to do this? I wish I was a coder and could do this sort of thing

Thank you!

Luke

Re: Will module disappear when read more is clicked? 12 years, 10 months ago #265

  • admin
Dear aquarian_design

I would like to answer you as follows:

1. One is have an option to resize the images but not constrain them to the sizes I input so they do not appear squashed or stretched but maintain their aspect ratio...is there a way to do this
=> In this case, please open modules\mod_yt_virtuemart_slickslider\libs\soslider.php file, at about line 226, find this code:

$nameImg = "resized_" . str_replace('/','',strrchr($imagePath,"/"));

and change to:

$nameImg = str_replace('/','',strrchr($imagePath,"/"));

$ext = substr($nameImg, strrpos($nameImg, '.'));

$file_name = substr($nameImg, 0, strrpos($nameImg, '.'));

$size = getimagesize( $imagePath );

// if it's not a image.
if( !$size ){ return ''; }

// case 1: render image base on the ratio of source.
$x_ratio = $width / $size[0];
$y_ratio = $height / $size[1];

// set dst, src
$dst = new stdClass();
$src = new stdClass();
$src->y = $src->x = 0;
$dst->y = $dst->x = 0;

if ($width > $size[0])
$width = $size[0];
if ($height > $size[1])
$height = $size[1];

$nameImg = $file_name . "_" . $width . "_" . $height . $ext;

2. The second problem is that when you click read more it takes you to the item info which is good but I would like the module to disappear because of limited real estate on the screen...is there a way to do this
=> In this case, you need to create new menus for your categories, the system will auto update Itemid for each link in the module

Hope this helps

Re: Will module disappear when read more is clicked? 12 years, 10 months ago #274

Thank you, I have found a way to fix the second problem and I will try your solution for the first.

I would like to pre-load the images I use for the "read-more" button since I created some images that go with the site. What file should I put a script to preload images?

I have tried to put a script in my index file but it does not seem to work, I think I may need to have the preload script in one of the module files?

Thanks,

Luke
  • Page:
  • 1
Time to create page: 0.21 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes