Search the Community
Showing results for tags 'save and stay'.
-
Hi, What else I need in order make some custom fields in Product class and save them in columns I created in ps_product table? If get some errors like: Unknown column 'price_recent1' in 'field list' What I have done: I tweaked Product.php in order to add the three fields: ... class ProductCore extends ObjectModel { ... public $price_recent1; public $price_recent2; public $price_recent3; ... 'price_recent1' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'), 'price_recent2' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'), 'price_recent3' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'), ... } then in mymodule.php I added the displayAdminProductsExtra hook in order to display a Tab inside the product edit backoffice: public function hookDisplayAdminProductsExtra($params) { global $smarty; $product = new Product((int)Tools::getValue('id_product')); if (Validate::isLoadedObject($product)) { $this->context->smarty->assign(array( 'price_recent1' => $product->price_recent1, 'price_recent2' => $product->price_recent2, 'price_recent3' => $product->price_recent3)); return $this->display(__FILE__, 'views/templates/admin/sleed.tpl'); } } and finally I display them in mymodule.tpl: <div id="mymodule" class="panel product-tab"> <input type="hidden" name="submitted_tabs[]" value="mymodule" /> <h3 class="tab"><i class="icon-info"></i> {l s='MyModule'}</h3> <div class="form-group"> <label class="control-label col-lg-3" for="price_recent1"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Recent Price #1'}"> {l s='Recent Price #1'} </span> </label> <div class="col-lg-9"> <input type="text" id="price_recent1" name="price_recent1" value="{$product->price_recent1|htmlentitiesUTF8}"/> </div><br> <label class="control-label col-lg-3" for="price_recent2"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Recent Price #2'}"> {l s='Recent Price #2'} </span> </label> <div class="col-lg-9"> <input type="text" id="price_recent2" name="price_recent2" value="{$product->price_recent2|htmlentitiesUTF8}"/> </div><br> <label class="control-label col-lg-3" for="price_recent3"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Recent Price #3'}"> {l s='Recent Price #3'} </span> </label> <div class="col-lg-9"> <input type="text" id="price_recent3" name="price_recent3" value="{$product->price_recent3|htmlentitiesUTF8}"/> </div><br> </div> <div class="panel-footer"> <a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel'}</a> <button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save'}</button> <button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save and stay'} </button> </div> Thanks for your time! -John
- 5 replies
-
- actionproductsave hook
- module development
- (and 2 more)
-
Hi, I am using Prestashop 1.6.1.20. Since 3 days I have been facing two issues in my shop. 1) Issue of endlessly spinning buttons of Save and Stay / Save. So, I am unable to edit any listing or add new listings to my website. In spite of refreshing or waiting.. it does not work. Also, sometimes I get 404 error when I refresh the page or try visiting new page. 2) I keep getting question marks instead of images on my website. This is happening randomly for some images.. not all images.. when I refresh the page then some different images will be having question marks. Also, there are times when I refresh the website and it works perfectly well.. without any question marks. Can anyone please help!
- 2 replies
-
- save and stay
- presta1.6
-
(and 1 more)
Tagged with:
-
Hi all, i have seen this one going around a bit but i have not found a fix which works for myself. in image 1 you will see my issue. The version i am running is shown at the top of the admin panel. image 2 is the config screen from within the admin area. Is anyone able to help me fix these buttons please.
-
When i create a product and click save and stay i get this url: http://www.glamourshoesaccessori.it/gestione/index.php?controller=AdminProducts&token=d218ae093c2d768c769c84fa563e8654&addproduct If u see there's no the product ID of generated product so the product is generated but i am redirected to new product page, so to complete the product details with images and variations i have to back to all products, search that product and edit, so this is not simply and is annoyng for my employees, how can i solve that?
-
- new product
- save and stay
-
(and 1 more)
Tagged with:
-
Hi to everyone. Sorry if it's already been reported, I did not find anything about it. Well, I've two prestashop store (1.5.6.0 and 1.5.4.1). In both site, when I edit a product in backoffice and click on "Save and stay" button the product is saved correctly, but after the page is reloaded the arrows in waiting overlay keep spinning and do not disappear. So I can't edit anything else, cause the page is covered by overlay until I reload the page by pressing F5. Any idea?
- 15 replies
-
- bug
- product page
-
(and 2 more)
Tagged with:
-
Hi, In my module i create a new hook for AdminProductController : public function hookdisplayAdminProductsExtra ($params){ echo 'hello world'; // + cancel / save / save and stay button } I got a problem when i try to use the button "save and stay", my "hello world" he's on the top of the web site. I'm try to debug, and arrived in AdminController : public function initContent(){ ... if ($this->display == 'edit' || $this->display == 'add') { if (!$this->loadObject(true)) return; p('$this->content : '. $this->content . ' ;'); $this->content .= $this->renderForm(); d('$this->content : '. $this->content . ' ;'); } ... } ... public function renderForm() { return 'ok'; } I get : $this->content : ; hello world $this->content : ok ; END So i don't rly understand why my hook are executed know. and why not other process like Supplier, Price ... Help! =D EDIT : forgot to say, i'm in prestashop 1.6.0.5 =)
- 1 reply
-
- hook
- AdminProduct
-
(and 1 more)
Tagged with:
-
Hi Fellow members, I need your help in resolving a strange issue on my portal : www.acmahabazaar.com " I can not get the products edited from the back end. While I try to edit any of the products, they don`t seem to reflect the edits applied, instead they retain their original values. For example I tryto edit this products price : http://screencast.com/t/2rPfBXFD6 >> http://screencast.com/t/do62OJysCg1S and while after entering the values http://screencast.com/t/s3sxVXkxFN and pressing "save and stay" I get redirected to the catalog list page http://screencast.com/t/XB9bXwetCD and I dont see the changes I have made to product price being applied Also, I don`t see any confirmation message/Error message and the same thing happens if the product is directly saved instead of "save and stay " Help Much appreciated!! -Seomaster
- 6 replies
-
- save and stay
- product edit
- (and 7 more)
-
no turn up the save and stay button on the add new product page
- 8 replies
-
- product page
- button save
-
(and 2 more)
Tagged with:
-
I built my online website: www.1sthour.com. At the beginning, when i Uploaded products, it can save and stay, or save. Normal operation of the Site. But, when i uploaded credit cart(RPPay), problem arises. When i Uploaded products, the page will show a few numbers. I Uninstall credit cart(RPPay), it was still that.What can i do now? Please help me.
-
When adding new product: Sometimes when I try to use "save" or "save and stay" button when adding new product . Button Dont work... Sometimes it will work. Where is the problem? Prestashop ver 1.5.3.1