User1234567891 Posted August 10, 2013 Share Posted August 10, 2013 I have looking through the forum and in the add ons shop, but I did not come across it. but maybe I am looking with the wrong terms. I am looking for something like this: http://www.nikkel-ar...d-on-white.html That front end users are able to enter size en then select which part of the image will be used. If it does not exist, is there anyone out there who could built this? Thanks! Link to comment Share on other sites More sharing options...
vekia Posted August 10, 2013 Share Posted August 10, 2013 hello unfortunately i don't know any solution for this. i've got some question: Customer have to upload own image, then select part of an image? Link to comment Share on other sites More sharing options...
PascalVG Posted August 11, 2013 Share Posted August 11, 2013 Hi lostrisq, Unfortunately I cannot se the example (max quota exceeded error), but MAYBE this can help? http://www.bazingadesigns.com/en/blog/tutorials/automatic-images-cropping-in-prestashop-1-5-2 My 2 cents, pascal Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2013 Share Posted August 11, 2013 but this is an feature for back office, and i suppose that lostrisq looking for feature for front office, especially for customers, something to define the part of the picture for print purposes Link to comment Share on other sites More sharing options...
PascalVG Posted August 11, 2013 Share Posted August 11, 2013 but this is an feature for back office, and i suppose that lostrisq looking for feature for front office, especially for customers, something to define the part of the picture for print purposes Ah... sorry, couldn't see example Link to comment Share on other sites More sharing options...
ramin Posted August 11, 2013 Share Posted August 11, 2013 I implement it on my site with jcrop: http://farsipresta.ir/diversso2/product.php?id_product=10 Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2013 Share Posted August 11, 2013 nice, im curious how it works. when you order a product, how it will looks in back office? Link to comment Share on other sites More sharing options...
User1234567891 Posted August 11, 2013 Author Share Posted August 11, 2013 Hey guys! Thanks for answering so swiftly! Ramin, that is exactly what I mean! Very very nice! Do you get the cropped image and sizes with the order in the backend? Is it something you built yourself? Link to comment Share on other sites More sharing options...
ramin Posted August 12, 2013 Share Posted August 12, 2013 yes i write an module to save my data into database and show in backoffice: <?php class SaveVariables extends Module { public function __construct() { $this->name = 'savevariables'; $this->tab = 'Test'; $this->version = 1.0; $this->author = 'ramin sarmadi'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('savevariables'); $this->description = $this->l('Save Variables on database'); } public function install() { if (parent::install() == false OR !$this->registerHook('orderConfirmation') OR !$this->registerHook('adminOrder')) return false; return true; } public function hookOrderConfirmation( $params ) { global $cookie; $id_order = $params['objOrder']->id; $x = $cookie->x; $y = $cookie->y; $w = $cookie->w; $h = $cookie->h; $wwr = $cookie->wwr; $hwr = $cookie->hwr; if(isset($_COOKIE["imagename"])) { $image_name = $_COOKIE["imagename"]; Db::getInstance()->Execute (" INSERT INTO `variables` (`id_order`, `image_name`, `x`, `y`, `w`, `h`, `wwr`, `hwr`) VALUES ('$id_order', '$image_name', '$x', '$y', '$w', '$h', '$wwr', '$hwr') "); } else { Db::getInstance()->Execute (" INSERT INTO `variables` (`id_order`, `image_name`, `x`, `y`, `w`, `h`, `wwr`, `hwr`) VALUES ('$id_order', 'imagenotexist', '$x', '$y', '$w', '$h', '$wwr', '$hwr') "); } } public function hookAdminOrder( $params ) { global $smarty; global $base_dir; $id_order = $params['id_order']; $variabels = Db::getInstance()->ExecuteS("SELECT * FROM `variables` WHERE `id_order` = '$id_order'"); $smarty->assign(array( 'x' => $variabels[0]['x'], 'y' => $variabels[0]['y'], 'h' => $variabels[0]['h'], 'w' => $variabels[0]['w'], 'wwr' => $variabels[0]['wwr'], 'hwr' => $variabels[0]['hwr'], 'imagename' => $variabels[0]['image_name'] )); $filename = $variabels[0]['image_name']; $uploadaddress = "http://" . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__ . "upload/php/files/thumbnail/" . $filename; $smarty->assign('uploadaddress', $uploadaddress); return $this->display(__FILE__, 'savevariables.tpl'); } } ?> Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2013 Share Posted August 13, 2013 ramin eveything looks fantastic, thanks for your contribution here. it looks like another great module for prestashop Link to comment Share on other sites More sharing options...
User1234567891 Posted August 15, 2013 Author Share Posted August 15, 2013 Wow ramin! That is amazing. Next week I wil free some time to try it out. Thank you so much for sharing this :-) Link to comment Share on other sites More sharing options...
User1234567891 Posted August 21, 2013 Author Share Posted August 21, 2013 I hope someone can give me a little push in the right direction. First time I ever did this and it is not completely clear to me. I have put the code in a php doc with if (!defined('_PS_VERSION_')) exit; on top. Modules recognizes it, but of course it can only be installed. I am unsure what to do next, because i can not find it anywhere and do not know how or where to implement it. Link to comment Share on other sites More sharing options...
vekia Posted August 21, 2013 Share Posted August 21, 2013 you're talkin about module attached above? in post number #9 ? Link to comment Share on other sites More sharing options...
User1234567891 Posted August 21, 2013 Author Share Posted August 21, 2013 Ah sorry, yes. The module mentioned above in post #9 Link to comment Share on other sites More sharing options...
vekia Posted August 21, 2013 Share Posted August 21, 2013 so if you copy whole code and save it as a module, it doesnt work? Link to comment Share on other sites More sharing options...
User1234567891 Posted August 21, 2013 Author Share Posted August 21, 2013 Well, I can see it in my modules, can install it... It is hooked in 'adminOrder' and 'orderConfirmation' as supposed to. But i just cannot find it in the front end. Or in the backend with the product/or orders (made a testorder). So I am unsure how to properly implement it. Link to comment Share on other sites More sharing options...
vekia Posted August 21, 2013 Share Posted August 21, 2013 it's because module, that you created is only for back offie (for save information in database) all other stuff related to the front office you have to create manually... the main problem is fact, that we don't know how he created it Link to comment Share on other sites More sharing options...
User1234567891 Posted August 21, 2013 Author Share Posted August 21, 2013 (edited) Ahh..... Now I see.... I thought it was complete. He used Jcrop to create it. Well, hopefully Ramin is willing to help out. Maybe a paid module even. Thanks Vekia Edited August 21, 2013 by lostrisq (see edit history) Link to comment Share on other sites More sharing options...
ramin Posted August 25, 2013 Share Posted August 25, 2013 Lostrisq, this module is just a part of this project not the whole project. Link to comment Share on other sites More sharing options...
vekia Posted August 25, 2013 Share Posted August 25, 2013 hello ramin is your project available somewhere to order / download ? Link to comment Share on other sites More sharing options...
ramin Posted August 30, 2013 Share Posted August 30, 2013 (edited) Yes, everybody can contact me to order this project. Edited June 29, 2014 by ramin (see edit history) 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