-
Posts
702 -
Joined
-
Last visited
-
Days Won
1
duredo last won the day on April 11 2015
duredo had the most liked content!
About duredo
- Birthday 12/23/1986
Contact Methods
- Website
Profile Information
-
Location
Indonesia
Recent Profile Visitors
42,325,204 profile views
duredo's Achievements
-
WebP issue during product download from integration
duredo replied to PanzerkampfPL's topic in General topics
PS 1.7 doesn't support webp format by default. PS 8 will have webp support natively. Source: https://github.com/PrestaShop/PrestaShop/issues/10356 I use module to serve webp image, but still use jpg as main images. -
Set Priority on Product discount
duredo replied to kamalpreet's topic in Configuring and using PrestaShop
@Diwad the code is works like this topic said, set priority on product discount. if it doesn't meet your need maybe you should create new topic.- 25 replies
-
- multiple discounts
- specific discounts
- (and 3 more)
-
Set Priority on Product discount
duredo replied to kamalpreet's topic in Configuring and using PrestaShop
@Diwad does my post works for you? Don't forget to delete the prod folder /var/cache/prod after create/edit override file.- 25 replies
-
- multiple discounts
- specific discounts
- (and 3 more)
-
Set Priority on Product discount
duredo replied to kamalpreet's topic in Configuring and using PrestaShop
Yup, working fine- 25 replies
-
- multiple discounts
- specific discounts
- (and 3 more)
-
Set Priority on Product discount
duredo replied to kamalpreet's topic in Configuring and using PrestaShop
I use this override for 1.7.7.1 create file in /override/classes/SpesificPrice.php <?php class SpecificPrice extends SpecificPriceCore { public static function getSpecificPrice( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0 ) { if (!SpecificPrice::isFeatureActive()) { return []; } if (!self::couldHaveSpecificPrice($id_product)) { return []; } if (static::$psQtyDiscountOnCombination === null) { static::$psQtyDiscountOnCombination = Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION'); $key = null; } else { $key = self::computeKey( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute, $id_customer, $id_cart, $real_quantity ); } if (!array_key_exists($key, self::$_specificPriceCache)) { $query_extra = self::computeExtraConditions($id_product, $id_product_attribute, $id_customer, $id_cart); if ($key === null) { $key = self::computeKey( $id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute, $id_customer, $id_cart, $real_quantity ); } $query = ' SELECT *, ' . SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer) . ' FROM `' . _DB_PREFIX_ . 'specific_price` WHERE `id_shop` ' . self::formatIntInQuery(0, $id_shop) . ' AND `id_currency` ' . self::formatIntInQuery(0, $id_currency) . ' AND `id_country` ' . self::formatIntInQuery(0, $id_country) . ' AND `id_group` ' . self::formatIntInQuery(0, $id_group) . ' ' . $query_extra . ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (static::$psQtyDiscountOnCombination || !$id_cart || !$real_quantity) ? (int) $quantity : max(1, (int) $real_quantity); $query .= ' ORDER BY `reduction_type` DESC, `reduction` DESC, `id_product_attribute` DESC, `id_cart` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC, `to` DESC, `from` DESC'; self::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } return self::$_specificPriceCache[$key]; } }- 25 replies
-
- multiple discounts
- specific discounts
- (and 3 more)
-
[SOLVED] Slow Performance When Customer Have a Lot of Orders
duredo replied to duredo's topic in General topics
thank you @Ress, I can't make it work with that. But you gave me the idea. create file in /override/classes/Customer.php and add this code <?php class Customer extends CustomerCore { public function getSimpleAddressSql($idAddress = null, $idLang = null) { if (null === $idLang) { $idLang = Context::getContext()->language->id; } $shareOrder = (bool) Context::getContext()->shop->getGroup()->share_order; $sql = 'SELECT DISTINCT a.`id_address` AS `id`, a.`alias`, a.`firstname`, a.`lastname`, a.`company`, a.`address1`, a.`address2`, a.`postcode`, a.`city`, a.`id_state`, s.name AS state, s.`iso_code` AS state_iso, a.`id_country`, cl.`name` AS country, co.`iso_code` AS country_iso, a.`other`, a.`phone`, a.`phone_mobile`, a.`vat_number`, a.`dni` FROM `' . _DB_PREFIX_ . 'address` a LEFT JOIN `' . _DB_PREFIX_ . 'country` co ON (a.`id_country` = co.`id_country`) LEFT JOIN `' . _DB_PREFIX_ . 'country_lang` cl ON (co.`id_country` = cl.`id_country`) LEFT JOIN `' . _DB_PREFIX_ . 'state` s ON (s.`id_state` = a.`id_state`) ' . ($shareOrder ? '' : Shop::addSqlAssociation('country', 'co')) . ' WHERE `id_lang` = ' . (int) $idLang . ' AND `id_customer` = ' . (int) $this->id . ' AND a.`deleted` = 0 AND a.`active` = 1 LIMIT 100'; #change the limit here if (null !== $idAddress) { $sql .= ' AND a.`id_address` = ' . (int) $idAddress; } return $sql; } } -
[SOLVED] Slow Performance When Customer Have a Lot of Orders
duredo posted a topic in General topics
hi, I have reseller that have a lot of orders. the problem is when they login, it will get slower and slower. my suspicious, because prestashop load all saved addresses. if my reseller have 1000 addresses, then it will load 1000 addresses. I can see in view-source: var prestashop = {"addresses": can we limit the var prestashop = {"addresses": just 100 or 200? how to do this, I can edit code. but don't know how to. thank you -
Cek di folder spam, kalau pakai metode php mailer kemungkinan besar dianggap spam. Solusinya pakai metode smtp, pakai pihak ketiga. Bisa dicoba sendinblue free, ada official modulenya di addons prestashop
-
duredo changed their profile photo
-
Update 15 Mei 2021 1. Teknologi server/hosting: Native Nginx -> Litespeed Web Server 2. Cloud hosting pakai upcloud (data center singapore) -> Vultr High Frequency Compute 3. server management runcloud -> cyberpanel 4. Internal prestashop: - theme pakai yg ringan dan teroptimasi theme classic rocket -> warehouse - hanya pakai module yg perlu saja, module ga terpakai di nonaktifkan -> sama - module page cache pro (berbayar) -> Litespeed Cache (free) - module webp images generator (berbayar) -> sama Hasilnya memuaskan
- 2 replies
-
- speed
- performance
-
(and 1 more)
Tagged with:
-
coba cek requirmentnya sudah oke semua belum, caranya upload file phppsinfo.php ke root, lalu akses misal domain.com/phppsinfo.php filenya download disini https://github.com/PrestaShop/php-ps-info