Troppau Posted February 16, 2012 Share Posted February 16, 2012 Hello all, I would like ask you how to insert images from PS1.4.6 new filesystem in other CRM. im using wordpress for blog about my shop and I would like add here some links to items from my store. see at blog.forseti-fashion.cz - right top corner, here are 3 links to clothes from my store, but I canot add here images. now Im using this code: $image_path = $image_folder . "/" . $product_id . "/" . $attribute_id . "/" . $product_id . $attribute_id. "-" . $image_size; this is possible use for first 10 products, but If I have more path is wrong. all other links are correct. Some ideas? Link to comment Share on other sites More sharing options...
Troppau Posted February 17, 2012 Author Share Posted February 17, 2012 No ideas? Link to comment Share on other sites More sharing options...
cedricfontaine Posted February 17, 2012 Share Posted February 17, 2012 Why don't use url like this one ? http://www.forseti-fashion.cz/3788-home/saty-figl-18-black.jpg Link to comment Share on other sites More sharing options...
Troppau Posted February 18, 2012 Author Share Posted February 18, 2012 Why don't use url like this one ? http://www.forseti-f...gl-18-black.jpg Yes, but I dont know how to get image name Link to comment Share on other sites More sharing options...
cedricfontaine Posted February 20, 2012 Share Posted February 20, 2012 What do you mean ? You did a script from the database ? Is it hard-coded ? Link to comment Share on other sites More sharing options...
Mark Hesketh Posted February 21, 2012 Share Posted February 21, 2012 You should be able to include at the top of your pages to load Prestashop's functions (changing the directory as required, so if you were using /blog/ you'd have to have '../config/config.inc.php' and '../init.php' etc). require(dirname(__FILE__).'/config/config.inc.php'); require(dirname(__FILE__).'/init.php'); This then means you'd be able to use Link::getImageLink($name, $ids, $type = NULL) from the Link class (/classes/Link.php line 162), which will return your image urls based on your rewrite rules set in Prestashop. I haven't tested this but it should work! Mark Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now