-
Posts
74 -
Joined
-
Last visited
Profile Information
-
Location
Ubonratchathanee, Thailand
-
Activity
Project Owner
Recent Profile Visitors
3,709,989 profile views
Suthichai's Achievements
Newbie (1/14)
20
Reputation
-
I override classes/Category.php and put it in override/classes. <?php class Category extends CategoryCore { public function getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null) { ..... ..... ..... if ($random === true) { $sql .= ' ORDER BY RAND()'; $sql .= ' LIMIT 0, '.(int)$random_number_products; } else $sql .= ' ORDER BY stock.quantity>0 desc, '.(isset($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way).' LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n; $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); /* if ($order_by == 'orderprice') Tools::orderbyPrice($result, $order_way); */ if (!$result) return array(); /* Modify SQL result */ return Product::getProductsProperties($id_lang, $result); } } I've also attached the file below. hth Category.php
-
In BO > Administration > Permissions > Edit
- 3 replies
-
- product
- backoffice
-
(and 1 more)
Tagged with:
-
Product accessories doesn't work. To make it work, I have to alter product.tpl (line 543) From {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0) To {if ($accessory.allow_oosp || $accessory.quantity > 0) Seems to work. Anybody know what is "$accessory.quantity_all_versions"? since I don't see it's being used anywhere else.
-
1.5.4.0 ไม่ต้องทำข้อ 4 4. เพิ่ม Record ที่ขาดหายไป โดยใช้ phpMyAdmin แล้ว run SQL... นอกนั้นทุกอย่างเหมือนกับ 1.5.3.1 ครับ เสร็จแล้วตอนตั้งค่า Preference > SEO & URLs ให้เลือก Accented URL เป็น Yes
-
ขอบคุณมากครับ สุดยอด override controllers/front/ProductController.php protected function transformDescriptionWithImg($desc) { // $reg = '/\[img-([0-9]+)-(left|right)-([a-z]+)\]/'; $reg = '/\[img\-([0-9]+)\-(left|right)\-([a-zA-Z0-9-_]+)\]/'; while (preg_match($reg, $desc, $matches)) { $link_lmg = $this->context->link->getImageLink($this->product->link_rewrite, $this->product->id.'-'.$matches[1], $matches[3]); $class = $matches[2] == 'left' ? 'class="imageFloatLeft"' : 'class="imageFloatRight"'; $html_img = '<img src="'.$link_lmg.'" alt="" '.$class.'/>'; $desc = str_replace($matches[0], $html_img, $desc); } return $desc; }
-
ที่ Back office ในส่วนของ Countries ค้น Thailand แล้วตั้งค่า Contains states: เป็น Yes ครับ
-
Database engine ตั้งเป็น innoDB หรือ MyIsam ครับ ถ้าเปลี่ยนเป็น MyIsam ค่อยใช้ได้ แสดงว่าโฮสของคุณไม่รองรับ innoDB
-
ไม่ทราบลองขั้นตอนเหล่านี้หรือยัง 1. ลบไฟล์ทั้งหมด (นอกจาก index.php) ใน cache/smarty/cache 2. clear browser cache ถ้าใช้ DirectAdmin ให้เปิด File manager ดูที่ช่อง Action ว่ามีอะไรผิดสังเกตุหรือเปล่า ถ้ามีคำว่า Reset Owner แสดงว่าเราไม่ได้เป็นเจ้าของไฟล์ เนื่องจากเจ้าของไฟล์ดันเป็น Apache
-
รายการแรก ดูจากฝั่งผมก็ดูได้นะครับ ดูตามภาพที่ผม capture ครับ http://imm.io/ZqMk เวอร์ชั่นอะไรครับ ถ้าเป็น 1.5 ก็ตามนี้ครับ 1. Override classes/Validate.php return preg_match('/^[_a-zA-Z0-9\-\pL]+$/u', $link); แก้เป็น return preg_match('/^[_a-zA-Z0-9\-\pL\pM]+$/u', $link); 2. Override classes/Dispatcher.php แก้ \pL ให้เป็น \pL\pM ทุกอัน (มี 28 อัน) 3. Override classes/Tools.php แก้ \pL ให้เป็น \pL\pM 4. สำหรับ 1.5.3.0 หรือ 1.5.3.1 ให้เพิ่ม record โดยรัน SQL ที่ phpmysql INSERT INTO `ps_configuration` (`id_shop_group`, `id_shop`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, NULL, 'PS_ALLOW_ACCENTED_CHARS_URL', '1', '2013-01-02 00:00:00', '2013-01-02 00:00:00')
-
Look for _COOKIE_KEY_ in setting.inc.php, and run this in your db: UPDATE ps_employee SET passwd = md5('CookieKeyNewPassword') WHERE email = '[email protected]' ex. UPDATE ps_employee SET passwd = md5('GH4QGsTjH0hY9IXrntPRhbn4RrSsj9BCBzkgnMJRSB55msSwr1H5IxRoABCD') WHERE email = '[email protected]' in this case, ABCD is going to be my new password
-
ไม่เข้าใจการตั้งค่าพวก shipping ครับ ขอตัวอย่างทีครับ
Suthichai replied to prestashop_begin's topic in ไทย [Thai]
เคยตอบใว้ตามนี้..... ตัวอย่างนี้เป็นแบบตามน้ำหนัก (Weight Ranges ) เริ่มจากตั้งค่า Weight Ranges ยกตัวอย่าง Thai Post นะครับ 1. ไปที่ Shipping > Weight Ranges 2. Add New เลือก Thai Post จาก drop down box (Carrier) ป้อนค่า From = 0, To = 2Kg แล้ว Save 2. Add New เลือก Thai Post จาก drop down box (Carrier) ป้อนค่า From = 2.1, To = 5Kg แล้ว Save ....... ........ เสร็จแล้วไป Shipping > Fees by carrier, geographical zone, and ranges เลือก Thai Post ก็จะมี range ให้ป้อนราคาของแต่ละ range ครับ ถ้าคำนวนตามราคาก็ทำคล้ายๆกัน เพียงแต่ไปตั้งค่าที่ Price Ranges ครับ -
ตรวจสอบ settings ของ gmail หรือยังครับว่าได้มีการเปิดใช้ IMAP Access หรือเปล่า Status ของ IMAP ต้อง enable ก่อน ดูรายละเอียดในการแก้ปัญหาได้ที่ http://support.googl...en&answer=78775
-
คงไม่มีใครใช้เป็น อยากรู้เหมือนกันครับ
-
igor.i, As far as I can see, Cyrillic is in the range of U+0400 and U+04FF, and I guess there isn't any that can be excluded in PREG_CLASS_SEARCH_EXCLUDE, except x{482}-\x{489} (which are Thousands Sign and Millions Sign) and it should be excluded any way. So I think (I maybe wrong) nothing can be done here. But I think the $PS_ALLOW_ACCENTED_CHARS_URL may be the cause, try to add the missing record to your database, it might help. See this post for the related issue http://www.prestasho...l-friendly-url/ Add missing field INSERT INTO `ps_configuration` (`id_shop_group`, `id_shop`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, NULL, 'PS_ALLOW_ACCENTED_CHARS_URL', '1', '2013-01-02 00:00:00', '2013-01-02 00:00:00');
-
How to show before-discount price in product list
Suthichai replied to zjean's topic in Core developers
Thank you. It works for 1.5.3.1 {if isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <span id="old_price_display">{convertPrice price=$product.price_without_reduction}</span> {/if}- 16 replies
-
- 1
-
-
- product list
- discount
-
(and 1 more)
Tagged with: