parcom Posted August 18, 2018 Share Posted August 18, 2018 (edited) Hi everyone, I am trying to find the database_field for in-stock and out-of-stock delivery time in PrestaShop 1.7, but I couldn't locate it on the database scheme. I would like add a custom delivery time for each product via .csv import. Where are these fields located and how are they actually called? Best regards, Parco PS: Corresponding fields in Presta Backend added as attachment (Can be found under "Shipping" settingof each product). Edited August 18, 2018 by parcom (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 18, 2018 Share Posted August 18, 2018 It seems you are using any module to achieve the same. I can't see such fields in the default PS. If you are using any third party module then check the same with module developer. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 18, 2018 Share Posted August 18, 2018 Sorry! My mistake. Fields are available in PS1.7.4 version. These values are being saved in product_lang table. Please refer to delivery_in_stock and delivery_out_stock columns. 1 Link to comment Share on other sites More sharing options...
parcom Posted August 18, 2018 Author Share Posted August 18, 2018 Thank you very much for your quick reply PrestaShop Addict! Link to comment Share on other sites More sharing options...
IonutP Posted December 23, 2019 Share Posted December 23, 2019 On 8/18/2018 at 12:21 PM, Knowband Plugins said: Sorry! My mistake. Fields are available in PS1.7.4 version. These values are being saved in product_lang table. Please refer to delivery_in_stock and delivery_out_stock columns. Hi, can you please let me know how can you display this informations on product details page? I tried to add the following code in product.tpl and it doesn't display anything {$product_lang.delivery_in_stock} {$product->delivery_out_stock} Link to comment Share on other sites More sharing options...
Klemart3D Posted February 20, 2020 Share Posted February 20, 2020 (edited) If defined, you can access by: {$product.delivery_in_stock} {$product.delivery_out_stock} And create conditions like in product-prices.tpl : {if $product.additional_delivery_times == 1} {if $product.delivery_information} <span class="delivery-information">{$product.delivery_information}</span> {/if} {elseif $product.additional_delivery_times == 2} {if $product.quantity > 0} <span class="delivery-information">{$product.delivery_in_stock}</span> {* Out of stock message should not be displayed if customer can't order the product. *} {elseif $product.quantity <= 0 && $product.add_to_cart_url} <span class="delivery-information">{$product.delivery_out_stock}</span> {/if} {/if} Edited February 20, 2020 by Klemart3D (see edit history) Link to comment Share on other sites More sharing options...
Guillaume77 Posted February 27, 2020 Share Posted February 27, 2020 Hi, I would like to change the "Delivery times" from "Default delivery times" to "Specific delivery times for this product" via .csv import. Do you know how to do this please ? The column is "additional delivery times" in the table "product". But i don't know if we can change the value via import. Thanks Link to comment Share on other sites More sharing options...
Klemart3D Posted February 27, 2020 Share Posted February 27, 2020 Have you tried by mapping CSV data with "Delivery time on stock" column in CSV import interface? Link to comment Share on other sites More sharing options...
Guillaume77 Posted February 27, 2020 Share Posted February 27, 2020 In this column i put my delivery time like "2weeks" for example. This time is add in "delivery time of in-stock products:" section, so it's perfect. But "Specific delivery time to this product" is not selected. So the delivery time "2 weeks" doesn't appear on product page... Link to comment Share on other sites More sharing options...
Klemart3D Posted February 27, 2020 Share Posted February 27, 2020 @Guillaume77 you're right, it seems missing "additional_delivery_times" field in CSV import class :https://github.com/PrestaShop/PrestaShop/blob/7633be8294d90148d2bdfe3fd1c2d403e72ec91b/controllers/admin/AdminImportController.php#L238 You can create an issue on GitHub Link to comment Share on other sites More sharing options...
Guillaume77 Posted March 5, 2020 Share Posted March 5, 2020 I found another solution. I change the value of "additional_delivery_times" in the ps_product table in phpmyadmin. I put 2 which corresponds to the third choice in the back office namely "Specific delivery times for this product". To change the value I do this : UPDATE `ps_product` SET `additional_delivery_times`="2" WHERE `additional_delivery_times`=1; Then I import my products with two columns for "delivery time in stock" and "delivery time out of stock" 1 Link to comment Share on other sites More sharing options...
Lizenka Posted February 5, 2024 Share Posted February 5, 2024 Hello Guilaume77, How do I get by ''ps_product''? Where can I find that? Link to comment Share on other sites More sharing options...
Nickz Posted February 5, 2024 Share Posted February 5, 2024 2 hours ago, Lizenka said: How do I get by ''ps_product''? phpmyadmin > table ps_product Link to comment Share on other sites More sharing options...
Lizenka Posted February 12, 2024 Share Posted February 12, 2024 Hello, Is there some who can tell me where I have to add this? UPDATE ps_product SET additional_delivery_times = '2' WHERE additional_delivery_times = '1'; 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