-
Posts
42 -
Joined
-
Last visited
Contact Methods
- Website
-
Skype
skorupa12
Profile Information
-
Location
Poland
-
Interests
Thinking
-
Activity
Developer
skorupa's Achievements
-
skorupa started following module for product configurator?
-
module for product configurator?
skorupa replied to littleredcar's topic in Looking for a module or a theme
Hi, there are few options to create configurable products in Prestashop. One is to use built in system, but if you have many option, than it can quickly kill you database. If you are searching for something that will give you more control, than you can use this module: https://addons.prestashop.com/en/combinaisons-customization/47410-advanced-product-configurator-by-steps.html there are other options in marketplace: https://addons.prestashop.com/en/467-combinaisons-customization so pick one that is most suited for your need and budget. If you need something more advanced, than you may need to contact developer like my self to help you develop customized solution (if so than PM me). Best regards. -
skorupa changed their profile photo
-
@octb what version of PrestaShop you are using?
- 22 replies
-
Hello, we are small team developing different online systems and applications. Recently we came to a point where we no longer have resources to work on Prestashop Addons and other projects. Comming to this conclusion we decided that we want to sell our Addons account. This package contains: Addons account if allowed by Addons team or migration of all our products to other Addons member Current modules: Music Shop, My Downloads, Product Information Source code of stated modules Rights to redistribute or sell modules and their source code Billing for extended support of modules current users. We can issue european invoice for buyer, if needed. If you are interested in offer PM me.
-
Obadaj sobie FirmesLink, nam się sprawdza. Support też mają bardzo dobry.
-
Prestashop Search sucks, so if you are not attached to it I prefer searching for other solution. Payed or not. From free ones http://bradsearch.io is quite good, tested on Prestashop 1.6 maby works on 1.7 and for payed ones search on addons.
- 22 replies
-
Mi pomogło sprawdzenie porzuconych koszyków, z userami którzy z nich korzystali. Dzięki temu miałem IP z którego klient wchodził. A to z kolej pozwoliło mi przeanalizować logi serwera www i wyciągnąć kolejne interakcje użytkownika ze sklepem. Jest to bardzo pracochłonne ale przy odrobinie szczęścia znajdziesz wspólny punkt dlaczego użytkownicy porzucali koszyki. Sprawdź też log błędów PHP, bo może najzwyczajniej w świecie coś się wywala na stronie koszyka (jakiś moduł płatności ma problemy, albo zajmuje za dużo pamięci). Co do błędu to może multilsklep je bardziej uwypuklił. Ale zarządzanie Prestą wiąże się z takim perełkami raz na jakiś czas.
-
Hi, can you explain more what do you mean by "never update core", do you mean that you only chek you theme and modules in repo, and Prestashop is excluded? Or you don't update Prestashop?
-
Actually I can :-D I programm in PHP & MySQL daily, and when I read AdminStatsController.php, I see everywhere parts of code that looks like that WHERE `invoice_date` BETWEEN ... You don't have to be a programmer to know that this stat will be based on invoice date :-D So new transactions will not be taken in to account in stats if generating invoice is turned off.
-
Hi, actually I updated shops where I use override solution to 1.6.1.10 and on both everything is working fine. Your enable -> disable solution will not work without override couse to generate statistics in dashboard Prestashop is checking what is invoice date. If there is none than it will not include such transaction in statistics :-[ Maby some other override changed statistics code in a way that prevent it from working. Regards.
-
Intermittent tax calculation errors
skorupa replied to bullywug's topic in Ecommerce x PrestaShop [ARCHIVE BOARD]
Hi, I have simmilar problem in PS 1.6.1.4 did you managed to fix this error somehow? -
Yes, you have to paste whole coude, couse it is override. It won't change any core files and thanks to that it will work after upgrade. One thing to remember it will only change statistics on Dashboard in backoffice. Our client didn't is using external invoice app with precise selling stats and thouse are used only as "quick view". Hope it will help @chienandalu
-
great FIX and still works with Prestashop 1.6.x
- 22 replies
-
I experienced similar problem with Prestashop 1.6.1.1 I did little research in code, and found out that: 1) only orders that have invoice counts so if you don't invoice order (e.g. you use external software to generate PDF invoice) 2) you only need to put this override to override/controllers/admin/AdminStatsController.php : <?php class AdminStatsController extends AdminStatsControllerCore { public static function getTotalSales($date_from, $date_to, $granularity = false) { if ($granularity == 'day') { $sales = array(); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT LEFT(`date_add`, 10) as date, SUM(total_paid_tax_excl / o.conversion_rate) as sales FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o').' GROUP BY LEFT(`date_add`, 10)'); foreach ($result as $row) { $sales[strtotime($row['date'])] = $row['sales']; } return $sales; } elseif ($granularity == 'month') { $sales = array(); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT LEFT(`date_add`, 7) as date, SUM(total_paid_tax_excl / o.conversion_rate) as sales FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o').' GROUP BY LEFT(`date_add`, 7)'); foreach ($result as $row) { $sales[strtotime($row['date'].'-01')] = $row['sales']; } return $sales; } else { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT SUM(total_paid_tax_excl / o.conversion_rate) FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o')); } } public static function getOrders($date_from, $date_to, $granularity = false) { if ($granularity == 'day') { $orders = array(); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT LEFT(`date_add`, 10) as date, COUNT(*) as orders FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o').' GROUP BY LEFT(`date_add`, 10)'); foreach ($result as $row) { $orders[strtotime($row['date'])] = $row['orders']; } return $orders; } elseif ($granularity == 'month') { $orders = array(); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT LEFT(`date_add`, 7) as date, COUNT(*) as orders FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o').' GROUP BY LEFT(`date_add`, 7)'); foreach ($result as $row) { $orders[strtotime($row['date'].'-01')] = $row['orders']; } return $orders; } else { $orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT COUNT(*) as orders FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o')); } return $orders; } public static function getPurchases($date_from, $date_to, $granularity = false) { if ($granularity == 'day') { $purchases = array(); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT LEFT(`date_add`, 10) as date, SUM(od.`product_quantity` * IF( od.`purchase_supplier_price` > 0, od.`purchase_supplier_price` / `conversion_rate`, od.`original_product_price` * '.(int)Configuration::get('CONF_AVERAGE_PRODUCT_MARGIN').' / 100 )) as total_purchase_price FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o').' GROUP BY LEFT(`date_add`, 10)'); foreach ($result as $row) { $purchases[strtotime($row['date'])] = $row['total_purchase_price']; } return $purchases; } else { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT SUM(od.`product_quantity` * IF( od.`purchase_supplier_price` > 0, od.`purchase_supplier_price` / `conversion_rate`, od.`original_product_price` * '.(int)Configuration::get('CONF_AVERAGE_PRODUCT_MARGIN').' / 100 )) as total_purchase_price FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o')); } } public static function getExpenses($date_from, $date_to, $granularity = false) { $expenses = ($granularity == 'day' ? array() : 0); $orders = Db::getInstance()->ExecuteS(' SELECT LEFT(`date_add`, 10) as date, total_paid_tax_incl / o.conversion_rate as total_paid_tax_incl, total_shipping_tax_excl / o.conversion_rate as total_shipping_tax_excl, o.module, a.id_country, o.id_currency, c.id_reference as carrier_reference FROM `'._DB_PREFIX_.'orders` o LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_delivery = a.id_address LEFT JOIN `'._DB_PREFIX_.'carrier` c ON o.id_carrier = c.id_carrier LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state WHERE `date_add` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 '.Shop::addSqlRestriction(false, 'o')); foreach ($orders as $order) { // Add flat fees for this order $flat_fees = Configuration::get('CONF_ORDER_FIXED') + ( $order['id_currency'] == Configuration::get('PS_CURRENCY_DEFAULT') ? Configuration::get('CONF_'.strtoupper($order['module']).'_FIXED') : Configuration::get('CONF_'.strtoupper($order['module']).'_FIXED_FOREIGN') ); // Add variable fees for this order $var_fees = $order['total_paid_tax_incl'] * ( $order['id_currency'] == Configuration::get('PS_CURRENCY_DEFAULT') ? Configuration::get('CONF_'.strtoupper($order['module']).'_VAR') : Configuration::get('CONF_'.strtoupper($order['module']).'_VAR_FOREIGN') ) / 100; // Add shipping fees for this order $shipping_fees = $order['total_shipping_tax_excl'] * ( $order['id_country'] == Configuration::get('PS_COUNTRY_DEFAULT') ? Configuration::get('CONF_'.strtoupper($order['carrier_reference']).'_SHIP') : Configuration::get('CONF_'.strtoupper($order['carrier_reference']).'_SHIP_OVERSEAS') ) / 100; // Tally up these fees if ($granularity == 'day') { if (!isset($expenses[strtotime($order['date'])])) { $expenses[strtotime($order['date'])] = 0; } $expenses[strtotime($order['date'])] += $flat_fees + $var_fees + $shipping_fees; } else { $expenses += $flat_fees + $var_fees + $shipping_fees; } } return $expenses; } } And remember to delete /cache/class_index.php. That fix is cheking stats based on order add date and not invoice date.