Jump to content

IgorOsnitsky

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by IgorOsnitsky

  1. Dear SIrs. First of all many thanks for Your contribution - it is very useful even for people with no initial skills in programming and experience in Prestashop. I read this forum since 2014 with many thanks for all of You sharing experience and helping to others. I have asked the question in the https://www.prestashop.com/forums/topic/248566-tutorial-how-to-automatically-disable-out-of-stock-products/, and have got some answers and recommends from Eolia but no solution yet. Maybe wider circle could help me. The problem is: Prestashop 1.6.1.7 / Store Commander ************************************************************************************************************************************************* Sometimes we need to solve another task - how to make all of products active even when the stock is 0 . We have used Eolia's Update Elements (free version making the product disabled when the stock=0) addon with success and thanks to author as we usually have > 10,000 products - each 1 pc in stock. So the products were disabled just after ordering and everything going smooth and clear. Worked great! Now we need to improve SEO (to avoid 404 pages) and customers' usability (to get the link to the product page in the product history - order-detail.tpl file in the template was edited) so we do need to keep the products active even with zero stock. We decided to use import CSV feature (using Store Commander in fact) to change product status (to active) and visibility (both, catalog, search or none). After disabling and unistalling Update ELements I have found a very strange behaviour. 1. When I change both the product status (to Active) and visibility (to any status) - everything is good (Checked in DB and B/O) 2. But after some time products statuses get disabled for all of products with zero stock. As it could be with Update Elements addon enabled :-). 3. After some testing and exploring I have found that the statuses of zero stock products are changed just after any order placed (as it was with UpdateElements addon enabled). Not only for the products ordered but for all of zero stocked products (>5,000 products), 4. I experimented with different visibility (both, catalog, search or none) and active status to enable. Everything is fine just after updating in DB but after any order all of products with no stock are changed to disabled and urls go to 404 page *************************************************************************************************************************************************************** I have received some answers and support from Eolia but have not solved the problem yet He has recommended me to look deeper into /classes/Product.php, /classes/PaymentModule.php or /classes/order/OrderHistory.php The only file changed after last CMS update is PaymentModule.php but I do not know what to look. (Should I compare changed copy with original one?) I do not have experience in exploring the code. What parts of files to look over? Where could be the problem? Any ideas would be appreciated Thank You in advance
  2. What kind of constructions to look there? Just seen Your message missed Recently I have made correction in order-detail.tpl to get the link in order-history instead of product name as follows: Maybe some conflicts appears? <!-- Classic products --> {if $product.product_quantity > $product.customizationQuantityTotal} <tr class="item"> {if $return_allowed}<td class="order_cb"><input type="checkbox" id="cb_{$product.id_order_detail|intval}" name="ids_order_detail[{$product.id_order_detail|intval}]" value="{$product.id_order_detail|intval}" /></td>{/if} <td><label for="cb_{$product.id_order_detail|intval}">{if $product.product_reference}{$product.product_reference|escape:'html':'UTF-8'}{else}--{/if}</label></td> <td class="bold"> <label for="cb_{$product.id_order_detail|intval}"> {if $product.download_hash && $logable && $product.display_filename != '' && $product.product_quantity_refunded == 0 && $product.product_quantity_return == 0} {if isset($is_guest) && $is_guest} <a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'html':'UTF-8'}-{$product.download_hash|escape:'html':'UTF-8'}&amp;id_order={$order->id}&secure_key={$order->secure_key}")|escape:'html':'UTF-8'}" title="{l s='Download this product'}"> {else} <a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'html':'UTF-8'}-{$product.download_hash|escape:'html':'UTF-8'}")|escape:'html':'UTF-8'}" title="{l s='Download this product'}"> {/if} <img src="{$img_dir}icon/download_product.gif" class="icon" alt="{l s='Download product'}" /> </a> {if isset($is_guest) && $is_guest} <a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'html':'UTF-8'}-{$product.download_hash|escape:'html':'UTF-8'}&id_order={$order->id}&secure_key={$order->secure_key}")|escape:'html':'UTF-8'}" title="{l s='Download this product'}"> {$product.product_name|escape:'html':'UTF-8'} </a> {else} <a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'html':'UTF-8'}-{$product.download_hash|escape:'html':'UTF-8'}")|escape:'html':'UTF-8'}" title="{l s='Download this product'}"> {$product.product_name|escape:'html':'UTF-8'} </a> {/if} {else} {* {$product.product_name|escape:'html':'UTF-8'} *} <a style="color: blue" target="_blank" href="{$link->getProductLink($product)|escape:'html'}">{$product.product_name|escape:'htmlall':'UTF-8'}</a> {/if} </label> </td> Commented the string (row 302) {* {$product.product_name|escape:'html':'UTF-8'} *} and put <a style="color: blue" target="_blank" href="{$link->getProductLink($product)|escape:'html'}"> {$product.product_name|escape:'htmlall':'UTF-8'}</a> instead Could it be the reason of such weird behaviour?
  3. Well. Which forum (chapter) You recommend me to post to get some ideas how to test and fix this problem ? Thank You in advance
  4. function __construct() { $this->name = 'updateelements'; $this->tab = 'content_management'; $this->author = 'Eolia '; $this->version = '2.2'; $this->bootstrap = true; parent::__construct(); $this->page = basename(__FILE__, '.php'); $this->displayName = $this->l('Update Elements'); $this->description = $this->l('Update categories & Products Visibility according quantities'); $this->confirmUninstall = $this->l('Do you really want to uninstall this module ?'); if (version_compare(_PS_VERSION_, '1.5', '>=')) $this->context = Context::getContext(); $this->addAsTrusted(); } This one is the piece of code You mentioned? Should I add proposed quote just before final "} " bracket? Or it does not matter as the phenomenon was real even with the module deleted? Thank You in advance
  5. What do You think... Should I add index.php standart to the /override/modules/ folder? In fact I will continue experimenting with different visibility statuses (both, catalog, search, none) but the important thing is active status... where it could be changed when updating after the order ??
  6. Look.. I just seen Your message 1. Understand I could enable non positioned hooks ActionObjectProductUpdate - http://joxi.ru/E2pbJBGu7O3wVr ActionProductUpdate - http://joxi.ru/EA46wXDfoPVnEm All of "IQ marked" modules are Warehouses Template (IQIT software) addons . Maybe I could move UpdateElements higher? 2. Regarding folders in /override/ * /override/classes/ - many folders inside with index.php but the only is /override/classes/order/ Order.php, OrderInvoice.php, OrderPayment.php - look inside but nothing about the products * /override/controllers/ - also empty but the only is /override/controllers/front/ with ContactController.php and SearchController.php (guess they are changed due to customs contact and search addons from template)
  7. Well... The situation is the same as before Please see screenshot - the products are all disabled after next order has confirmed Need to run Store Commander CSV import script to enable them and make the fields Active = 1 Any other ideas? Maybe I can switch off this effect someher in classes? Your comments would be highly appreciated Regards
  8. Hi! I did not understand Your recommends completely please regret. I installed again updateelements addon and set visibility to all In Modules >> Positions I cannot find the hook product update or something and no hooks where Update Elements addon Also there are no files in the /override/modules/ folder. I do not know whether index.php required there or not Anyhow I need to wait until the order come to see what would be going on Thank You in advance
  9. I quoted this mention in the 1st message. And it's true - I have deleted and the situation was the same Many thanks for Your support, Eolia. How can I find the module or override which effected on this behaviour? (with no programming skills) Or maybe I could install again UpdateElements ( I have backUp copy of the ZIP file) and set up "Visible for all" option" ? :-) Thank You in advance for Your opinion
  10. Dear Eolia Many thanks for Your attention and kind message. The thing is that we uninstalled and deleted addon from server. I could try to find zip file in my folders and install again adding the quote You mentioned. Would it help? Actually I run Store Commander import CSV process restoring active status of sold products but it not convenient at all ))
  11. Dear Eolia! Many thanks for Your comment. I have already checked Your new version. Your addon worked great, many thanks! But now we need another functionality - to keep the product active Suppose that no overrides and no phpcache (honestly I do not understand clearly this option) Any idea what is the phenomenon and what to do? Thank You in advance
  12. Dear Sirs. Sometimes we need to solve another task - how to make all of products active even when the stock is 0 . Prestashop 1.6.1.7 We have used Eolia's Update Elements addon (free version) a couple years with success as we have > 10,000 products - each 1 pc in stock. So they were disabled just after ordering and everything going smooth and clear. Worked great! Now we need to improve SEO (to avoid 404 pages) and customers' usability (to get the link to the product page in the product history) so we do need to keep the products active after stock finished. We decided to use import CSV feature to change product status (to active) and visibility (both, catalog, search or none). After disabling and unistalling Update ELements I have found a very strange behaviour. 1. When I change both the product status (to Active) and visibility (to any status) - everything is good (Checked in DB and B/O) 2. But after some time products statuses get disabled for all of products with zero stock. As it could be with Update Elements addon enabled :-). 3. After some testing and exploring I have found that the statuses of zero stock products are changed just after any order placed (as it was with UpdateElements addon enabled). Not only for the products ordered but for all of zero stocked products (>5,000 products), Could You please tell me - what could be the reason of this behaviour? I have sent PM to Eoila but understand no connection between the module and this behaviour Maybe You could give me some idea how to fix it (and where). Any specific setting > search in BO? I have no deep knowledge of php but can read some files and feel it could be Product.php or another cfile in /classes/ BTW - Maybe somebody knows how to place products with stock=0 at the end of product-list category pages for any sort chozen Thank You in advance
  13. Learned many topics regarding - How to add {shipping_number} variable into shipped email template Tracking No should be inserted by Admin before changing status to SHIPPED Trying to locate this piece of code inside the file ***/controllers/admin/AdminOrdersController.php Found two similar parts of this. Can anybody help which part of code to be replaced?... The first one? Both of them? Understand I could have add just '{shipping_number}' => $order->shipping_number Thank You in advance UPD: I have changed the first piece of code and found white screen in Admin >>> Orders
  14. Great!!! Many thanks! I've arranged carriers restriction with Free shipment cart rule for orders exceeds the level. And could not understand why "free delivery" notice appears for chosen carriers . It should be the amount here and the customer could pick required option. If no restrictions applied - all of carriers are shown with the delivery costs. And free delivery will be calculated on the final confirmation step. Of course the cart rule's free shipment bug (for separate choice of carriers) is still there. But Your message is very helpful for me. Hope all of this topic wi be helpful for others. Long live Prestashop forum!
  15. Many thanks for awesome module improving feedback quality. Just test and think how to use it better. Checked all comments in the topic as the below mentioned issues are still open for me. 1. Rejecting email - is not sending actually. Did not realise completely - how to edit prestaqna.php file to allow rejecting email? 2. Regarding placing Q&A Module content and form in the product tabs - if anybody know the solution - would be helpful Dear Nemo1 ! Many thanks again for the module, other contribution in the community and interesting article I read from Your Facebook & Twitter feeds.
  16. I started to edit by the plan presented by jbob23, go through some steps 1. Through the Hosting control panel I can edit tpl files , but cannot edit php - product.php and blocklayered.php . UPD: Hosting people adviced me that there is a restriction for direct editing (via control panel) of large files and recommend me to use FTP - will do a bit later 2. Regarding note of "What to add" by [email protected] <p id="product_condition"> <label>{l s='Condition'} </label> {if $product->condition == 'new'} <link itemprop="itemCondition" href="http://schema.org/NewCondition"/> <span class="editable">{l s='New'}</span> {elseif $product->condition == 'used'} <link itemprop="itemCondition" href="http://schema.org/UsedCondition"/> <span class="editable">{l s='Used'}</span> {elseif $product->condition == 'refurbished'} <link itemprop="itemCondition" href="http://schema.org/Re...shedCondition"/> <span class="editable">{l s='Refurbished'}</span> {elseif $product->condition == 'handmade'} <link itemprop="itemCondition" href="http://schema.org/HandmadeCondition"/> <span class="editable">{l s='Handmade'}</span> {/if} I found the following http://schema.org/OfferItemCondition And Damaged condition added in the scheme: http://schema.org/DamagedCondition So I risked to edit as follows <p id="product_condition"> <label>{l s='Condition'} </label> {if $product->condition == 'new'} <link itemprop="itemCondition" href="http://schema.org/NewCondition"/> <span class="editable">{l s='New'}</span> {elseif $product->condition == 'used'} <link itemprop="itemCondition" href="http://schema.org/UsedCondition"/> <span class="editable">{l s='Used'}</span> {elseif $product->condition == 'refurbished'} <link itemprop="itemCondition" href="http://schema.org/Re...shedCondition"/> <span class="editable">{l s='Refurbished'}</span> {elseif $product->condition == 'damaged'} <link itemprop="itemCondition" href="http://schema.org/DamagedCondition"/> <span class="editable">{l s='Damaged'}</span> {/if} Update 3. I did all files modifications offered by jbob23. product.tpl information.tpl product.php blocklayered.php 4. I run two different SQL queries ALTER TABLE `ps_product` CHANGE `condition` `condition` ENUM('new','used','refurbished','damaged') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'new'; ALTER TABLE `ps_product_shop` CHANGE `condition` `condition` ENUM('new','used','refurbished','damaged') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'new'; (frankly I am not good in understanding the details and responses - PHPMyadmin return null record in both cases - guess it is normal as not yet products with the new condition (damaged) inside Please see screenshot http://joxi.ru/Grqyqv0SbdkDrz 5. The result BO - Product information - damaged option appears in the drop down list of condition options When did I try to assign the product with the new option and see - blank of the BO page appeared with Internal server error 500 Same result - for FO for sure Any idea - which steps were missed or wrong? Thank You in advance
  17. Many thanks for Your recommends, dear moy2010! I have ordered on themeforest, installed. Everything looks perfect for the moment. Excellent layouts, great flexibility, perfect support!
  18. Good evening, Prestashop gurus and enthusiasts! Could You please help me to solve the problem I have with the debug mode on and off My site is as follows: http://mk-i-tochka.ru.xsph.ru/ 1. When I test now - I have an error above the site content - please see screenshot http://joxi.ru/p27owbDCLexl27 I know the nature of the error - it is regarding delivery module which require complete information about shipping weight and dimensions. In root/config folder the file defines.inc.php includes the code which is to disable the debug mode as follows: /* Debug only */ if (!defined('_PS_MODE_DEV_')) define('_PS_MODE_DEV_', false); /* Compatibility warning */ define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false); if (_PS_MODE_DEV_) { @ini_set('display_errors', 'on'); @error_reporting(E_ALL | E_STRICT); define('_PS_DEBUG_SQL_', true); } else { @ini_set('display_errors', 'off'); define('_PS_DEBUG_SQL_', false); } define('_PS_DEBUG_PROFILING_', false); define('_PS_MODE_DEMO_', false); It is strange for me. Why does this appear even with turned off debug mode? I would be pleased if You could give me an idea. 2. Yesterday I tried to set up watermark module. And it has crushed my BO and FO - I asked hosting support people to recover. After recovery some message could start appearing (something happenned wrong with ajax cart adding and deleting) - please see the following screenshot http://joxi.ru/gmv7EbQfeYnQ2a Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: Unexpected token a' responseText: array(1) { ["error"]=> array(1) { [0]=> array(2) { ["code"]=> int(4) ["text"]=> string(70) "Ошибка при указании параметров 0 места" } } } array(1) { ["error"]=> array(1) { [0]=> array(2) { ["code"]=> int(4) ["text"]=> string(70) "Ошибка при указании параметров 0 места" } } } {"products":[{"id":641,"link":"http:\/\/mk-i-tochka.ru.xsph.ru\/svitera-pulovery-djempery\/641-djemper.html#\/razmer_odezhda_staryj-46\/cvet-seryj","quantity":1,"image":"http:\/\/mk-i-tochka.ru.xsph.ru\/510-home_default\/djemper.jpg","image_cart":"http:\/\/mk-i-tochka.ru.xsph.ru\/510-cart_default\/djemper.jpg","priceByLine":"400 \u0440\u0443\u0431","name":"\u0414\u0436\u0435\u043c\u043f\u0435\u0440 Oiu","price":"400 \u0440\u0443\u0431","price_float":400,"idCombination":416,"idAddressDelivery":47,"is_gift":false,"hasAttributes":true,"attributes":"46, \u0421\u0435\u0440\u044b\u0439","hasCustomizedDatas":false,"customizedDatas":[]},{"id":20,"link":"http:\/\/mk-i-tochka.ru.xsph.ru\/kofty-bluzki-rubashki\/20-vodolazka-rozovaja.html#\/razmer_odezhda_staryj-36\/cvet-rozovyj","quantity":3,"image":"http:\/\/mk-i-tochka.ru.xsph.ru\/453-home_default\/vodolazka-rozovaja.jpg","image_cart":"http:\/\/mk-i-tochka.ru.xsph.ru\/453-cart_default\/vodolazka-rozovaja.jpg","priceByLine":"1 200 \u0440\u0443\u0431","name":"\u0412\u043e\u0434\u043e\u043b\u0430\u0437\u043a\u0430 \u0440\u043e\u0437\u043e\u0432\u0430\u044f","price":"1 200 \u0440\u0443\u0431","price_float":1200,"idCombination":534,"idAddressDelivery":47,"is_gift":false,"hasAttributes":true,"attributes":"36, \u0420\u043e\u0437\u043e\u0432\u044b\u0439","hasCustomizedDatas":false,"customizedDatas":[]}],"discounts":[],"shippingCost":"240 \u0440\u0443\u0431","shippingCostFloat":240,"wrappingCost":"0 \u0440\u0443\u0431","nbTotalProducts":4,"total":"1 840 \u0440\u0443\u0431","productTotal":"1 600 \u0440\u0443\u0431","freeShipping":"0 \u0440\u0443\u0431","freeShippingFloat":0,"hasError":false,"crossSelling":"" Also on deleting products from the cart (using ajax) - Error: unable to delete the product Please advice any idea how to fix that problem Thank You in advance
  19. Dear developpers, themes' designers and Prestashop users. Please recommend template for Prestashop 1.6 which could be suitable for B2B Marketplace (Seller could sell their products, mostly equipment). I explored many themes in themeforest but not yet decided which one is better. As I am not involved in development and design it is not easy for me to describe demands and features but I will try: Responsive design Multiple skins Simple but flexible layout Information on products (product features, model names, manufacturers icons, prices) for visitors is more important (and more place on the pages) than images (thumbs sizes, quality, presantation, sliders, carts). Grid / List / Mini list view switch for category view. More attention to information than images again Placing more information on product features and details, manufacturers onto Category pages (with hover on grid view) and list view 3 columns on Product pages - right column for seller's information, contact and other details (Possible) 3 columns on Category view for the same reason Home page filled with different category selections (for instance - daily deals, selection by places-seller locations, sellers lists, new arrivals, list by manufacturer, etc etc...) Currency switch Blog Thank You in advance
  20. Many thanks for Your kind answer. Yes, if I enable the default favoriteproducts mmodule from Prestashop quicksearch is working
  21. First of all many thanks to Alex Simonchik, A_Distortion and other discussion makers For Prestashop 1.6.0.9. (default-bootstrap) My idea was to get this feature (Favourite products) for the user who could mark interesting products and place them to his favourites area (like a short memory during session). 1. I tried the module prepared by of A_Distortion. It works for sure placing required button and string (Add this to my favourite products) onto product's container on the list of products 2. How to make the button and link enabled for the customers not logged in . I trace through the module and find the following inside /modules/favoriteproducts/favouriteproducts.php public function hookDisplayLeftColumnProduct($params) { include_once(dirname(__FILE__).'/FavoriteProduct.php'); $this->smarty->assign(array( 'isCustomerFavoriteProduct' => (FavoriteProduct::isCustomerFavoriteProduct($this->context->customer->id, Tools::getValue('id_product')) ? 1 : 0), 'isLogged' => (int)$this->context->customer->logged, )); return $this->display(__FILE__, 'favoriteproducts-extra.tpl'); } I feel that it is here. But I have no experience in php - how to change it. 3. After enabling changes proposed in this topic (CategoryController.php , product-list.tpl and A_Distortion version of favourite products module ) I have found that Quick search (blocksearch) did not work as ajax. It is searching just after clicking Go button. When I disabled favouriteproducts module - quicksearch works again Any idea how does this effect work? NB: If anybody knows other decisions - how to give the easy tool to the customer = to keep favourite products during browsing session - it would be great. Thank You in advance
  22. Hello, WebTetDev ! Many thanks, interesting idea! It is not worked properly with blocksearch module I have in my 1.6.0.9 - Take a look onto screenshots 1. Firstly loaded Your module column of products with images 2. About 1 sec later - blocksearch module is loading its results over Just FYI
  23. Thanks a lot, dioniz! Great and useful contribution!
  24. Dear Prestashop gurus and inspired newbies. I cannot solve some question important for me so I would be pleased if You could take a look onto screenshot. I do not speak fluent in smarty and css languages so hope it would be easy for You to solve the following ideas: Need smaller thumbs (like 100*100 rather than 166*166 - theme default-bootstrap) and more info on the product to be displayed below or side to the each product's image 1. How to decrease image size for same products category block? I try through BO image resizing and regenerating thumbs (even down to cart_default size - it works for blockview and some other modules but here - nothing. I guess it is the question mainly on the whole image container block size. 2. Is that possible to add some content in the productscategory.tpl to display in the block close to image - like brief description or manufacturer image? I tried with the same technique as for product-list.tpl but nothing appeared. Thank You in advance
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More