Show Posts


Messages - otterslide

Pages: [1] 2
1
Support / Re: Thumbnails white background padding
« on: December 05, 2014, 07:26:18 PM »
I've figured it out, based on some code I found online.

If anyone ever needs this, here is the code.. I just change resize() function.

You'll need to maintain this across upgrades as it modified AbanteCart functionality directly.

core/lib/image.php

Code: [Select]
//new function I made
public function newResize($width, $height)
{

$THUMBNAIL_IMAGE_MAX_WIDTH = $width;
$THUMBNAIL_IMAGE_MAX_HEIGHT = $height;

$source_image_width = $this->info['width'] ;
$source_image_height = $this->info['height'];

$source_gd_image = $this->image;


$source_aspect_ratio = $source_image_width / $source_image_height;
$thumbnail_aspect_ratio = $THUMBNAIL_IMAGE_MAX_WIDTH / $THUMBNAIL_IMAGE_MAX_HEIGHT;
if ($source_image_width <= $THUMBNAIL_IMAGE_MAX_WIDTH && $source_image_height <= $THUMBNAIL_IMAGE_MAX_HEIGHT) {
$thumbnail_image_width = $source_image_width;
$thumbnail_image_height = $source_image_height;
} elseif ($thumbnail_aspect_ratio > $source_aspect_ratio) {
$thumbnail_image_width = (int) ($THUMBNAIL_IMAGE_MAX_HEIGHT * $source_aspect_ratio);
$thumbnail_image_height = $THUMBNAIL_IMAGE_MAX_HEIGHT;
} else {
$thumbnail_image_width = $THUMBNAIL_IMAGE_MAX_WIDTH;
$thumbnail_image_height = (int) ($THUMBNAIL_IMAGE_MAX_WIDTH / $source_aspect_ratio);
}
$this->image = imagecreatetruecolor($thumbnail_image_width, $thumbnail_image_height);

imagecopyresampled($this->image, $source_gd_image, 0, 0, 0, 0, $thumbnail_image_width, $thumbnail_image_height, $this->info['width'], $this->info['height']);


if(is_resource($source_gd_image)){
imagedestroy($source_gd_image);
}


$this->info['width']  = $thumbnail_image_width;
        $this->info['height'] = $thumbnail_image_height;

return true;
}


    public function resize($width = 0, $height = 0, $nofill=flase) {
   

if (!$this->info['width'] || !$this->info['height']) {
return;
}
        if ($width == 0 && $height == 0) {
return;
}

if(is_resource($this->image)){
$this->newResize($width, $height);
}
 
    return true;
    }


2
Support / Re: HOW CAN I EDITH MY PRODUCT CATEGORIES
« on: December 04, 2014, 05:08:27 PM »
That would be very difficult with the HTML5 responsive layout.  It depends what layout you're using.  If you want a side menu on the left you'll likely have to go with a fixed layout, or you'll need to really work at it to make it responsive with a lot of media queries in the CSS.

I'd say the PHP is not the problem, the templates can be changed all you want.. it's the template styles that would require a lot of work.  If you look at alibaba, and resize it to 320 width, it can't manage that.

Something like

themes.tielabs.com/?theme=sokar

would be a theme like what you're looking for regarding the menu.. it would take a lot of work to integrate that into AbanteCart though.

You may be able to find a freelancer, etc. who could do that, but it's definitely not impossible.

3
Support / Thumbnails white background padding
« on: December 04, 2014, 05:02:08 PM »
Hello,

Is there a simple way to remove the white padding from my thumbnails?  I want to add box shadow to my item thumbnails, but the white padding that makes all photos same size is preventing this..

Any help is appreciated!  I can change php code if needed.

Thanks!

4
Support / Re: Open Graph Og:image
« on: November 02, 2014, 09:14:28 PM »
No.. will that add the Og graph tags in the product headers?  Or does it just pass the values through another way?  I want to have Og in case people paste the URL in facebook manually as well.

Hi,have you tried using the sharethis extension?

http://marketplace.abantecart.com/sharethis 

5
Support / Open Graph Og:image
« on: November 02, 2014, 12:51:43 PM »
Is there any open graph support ?

I'm adding facebook share button but I need og:image in the header..
Just wondering if there's anything already there?


6
Support / Re: Estimate - Please Select
« on: November 01, 2014, 04:38:58 PM »
In Cart.php line 325

\storefront\controller\pages\checkout\cart.php

you can set country_id to -1
      //try to get shipping address details if we have them
         $country_id = -1;

and in
\storefront\view\default_html5\template\form\countries_zones.tpl

you can add Select country

   <option value="">--- Please Select A Country ---</option>

   <?php foreach ( $options as $v => $text ) { ?>

this has achieved the result I wanted.

There's still the issue that once you navigate away and come back, it doesn't save what you previously entered..

7
Support / Re: Estimate - Please Select
« on: November 01, 2014, 03:52:06 PM »
Thanks, I'll do that too.. Yes it's not very user friendly, especially by having the wrong options pre-selected for you.. Doesn't really make sense to do that at all.



To the best of my knowledge and testing does use what you've setup as the default locale. 

The issue I have encountered with a lot of site visitors is they don't understand what they need to do to get the estimate to work.  So I changed the instruction that shows up in the box right above the area  to say:


Estimate Shipping & Taxes - If shipping: input zip code and enter. Look in drop down box and make your selection.

We have offer store pickup, so the If shipping is appropriate for us - See if something like that will work for you.

Lee

8
Support / Estimate - Please Select
« on: November 01, 2014, 01:17:45 PM »
Hello,

When I check out, the Estimate auto-selects the country/region of the local shopping cart's address.
Is there any way to make it show "Please Select" instead ?

I tried adding a country called "Please Select" but then at final checkout it has double Please Select..

9
Support / Ship Estimate Unkown Ajax Error
« on: November 01, 2014, 01:08:29 PM »
Hello,

I have SSL Enabled.  If I go to the cart checkout it defaults to https and ship Estimate works.

But if I change the URL to "http" , then try to do an estimate, I get "Unknown Ajax Error"..

Not sure if this will happen in real life, but it would be nice if it worked both ways, or at least "http" for the checkout should re-direct to https and not allow it to even show.. any idea how I could do this?

Thanks!

10
Support / Newsletter confirmation email
« on: October 30, 2014, 12:55:42 PM »
Is there any way to set subscriptions so they require a confirmation e-mail ?  I can't see this anywhere.  Without it, someone can sign up hundreds of fake e-mails..

Also, I need the outgoing e-mail to have an unsubscribe link.  This is all required in Canada in order to send any newsletter.

11
New Features Discussion / Re: Product filter block
« on: October 26, 2014, 05:08:01 PM »
+1 .

12
New Features Discussion / Re: Breadcrumbs with all categories
« on: October 25, 2014, 09:36:59 PM »
I've managed to do it on my own, if anyone is interested they can show their support here.

I think for SEO purpose, search engines don't want to see that breadcrumb differ depending on the route they took.   I also would not like it being a visitor.. It's really annoying when you arrive a product and you don't know what category it's part of so you can see more products like it.

13
New Features Discussion / Related items
« on: October 25, 2014, 05:48:56 PM »
Would be very nice to have instead of "Latest Items"  the same format "Related Items" instead of the current "tab" format.

Also, when I try to add related items and click the checkbox at the top for Select All, it selects all in the list, but doesn't pick them up once I press "Apply selections"..

Only if I click each one by hand it really adds them..

14
New Features Discussion / Breadcrumbs with all categories
« on: October 25, 2014, 05:44:10 PM »
Hello,

The problem I'm having is when clicking on a "latest product" while viewing another product

The category at the top lists
Home > Product

but if I go to it's category and click on it then I get
Home > Category > Product

I think that even when going from "Latest" there should be a category, and if the product is in multiple categories, it could also list all of them.

Any pointers where these breadcrumbs are set would be appreciated, so I can set them to all categories.





15
Support / Re: Displaying in stock options on product listing
« on: October 20, 2014, 01:40:13 PM »
Never mind, It looks like it does cache,

$this->cache->set( 'product.options.'.$product_id, $product_option_data, $language_id );

thanks again.

Pages: [1] 2

Powered by SMFPacks Social Login Mod