-
Posts
3,035 -
Joined
-
Last visited
-
Days Won
465
Content Type
Profiles
Forums
Gallery
Downloads
Articles
Store
Blogs
Everything posted by datakick
-
It won't affect files/directories stored on the file system. You will obviously loose anything stored in the database. Third party modules won't be installed anymore, etc.
-
You can simply reinstall the system in-situ: drop database using phpmysql copy install directory from thirtybees.zip file to your thirtybees root directory (you probably deleted this directory after you installed the system for the first time) go to www.yourdomain.com/install and you will be able to re-install the system
-
Github - I've filed the issue https://github.com/thirtybees/thirtybees/issues/1207
-
Then file an issue
-
Good job for a first override. Keep them going 🙂 My insights: Override should not contain anything that is not needed. You should delete all methods that you didn't modified, such as aliasExist or getAddressIdBySupplierId. When you override method, you should always try to call parent version. Sometimes it's not possible, but in your case it is. Your getZoneById should look something like this: public static function getZoneById($idAddress) { $postcode=self::getPostcodeByAddress($idAddress); if (in_array($postcode,array(2450))) { return 9; } return parent::getZoneById($idAddress); } Your new business logic at the very beginning of the method. If the postcode is 2450 then this method will return 9 (id of your new carrier). Otherwise, the original version of the method (from /classes/Address.php) will be called. Calling parent method is very important. It makes sure that your override will work correctly with future versions of thirtybees. The result override might look like this: class Address extends AddressCore { /** * Return postcode of address * * @param int $id_address Address id * @return string postcode * @throws PrestaShopDatabaseException * @throws PrestaShopException */ private static function getPostcodeByAddress($id_address) { $row = Db::getInstance()->getRow(' SELECT `postcode` FROM '._DB_PREFIX_.'address a WHERE a.`id_address` = '.(int)($id_address)); return $row['postcode']; } /** * Get zone id for a given address * * @param int $idAddress Address id for which we want to get zone id * * @return int Zone id * * @throws PrestaShopDatabaseException * @throws PrestaShopException * @since 1.0.0 * @version 1.0.0 Initial version */ public static function getZoneById($idAddress) { $postcode = static::getPostcodeByAddress($idAddress); if (in_array($postcode,array(2450))) { return 9; } return parent::getZoneById($idAddress); }
-
Thank you, this will help fix the coreupdater issue. Until then, you should do this: 1) execute this in phpmyadmin drop table ps_page_cache; 2) go to core updater and let it re-create the page for you from scratch PS: this 'fix' can be used for table <PREFIX>page_cache only. If anyone encounter similar issue with other tables, please don't 'drop' them 🙂
-
Not really. I need to see the complete result, not truncated. There's a settings for this in phpmyadmin -- see answer here https://dba.stackexchange.com/questions/175426/output-getting-truncated-in-phpmyadmin
-
Could you run this statement in phpmyadmin and show results: SHOW CREATE TABLE ps_page_cache;
-
Using ftp or ssh - delete directory cache/smarty, and then re-create it again
-
Use core updater to upgrade to latest bleeding edge. Use core updater to check that there are no database differences. Then try again. If this doesn't help, then check what overrides you have installed - there's overridecheck module for that.
-
Isn't it beautiful how one can easily update shop in just a minute?
-
It's as safe as any official release. Unfortunately, there is no QA team that would thoroughly test each release. Every release is just an arbitrary point in time / code base.
-
Update to 1.1.x / bleeding edge
-
What tb version are you running?
-
This commit might fix the issue https://github.com/thirtybees/thirtybees/commit/538036cc7faa2d9129ffbd2810d5cbaf25d9fbff
-
This is a forum, one of many forums I'm participating in. I'm subscribed to hundreds of threads. Unfortunately, it's very easy to miss/forget some message.
-
Yes. It's number two on the todo list (for this project) Addresses are filtered by currently selected country. If you select destination country for which no address exists yet, you will be asked to enter new one. You can switch to the list of existing addresses and choose one, but that will change destination country as well. Which mean recalculation of the cart, shipping rates, etc...
-
I don't follow. Can you please explain a little bit more?
-
Not sure if this is a bug, really. It's definitely nuisance / ui glitch, but I don't think it prevents anyone from completing the checkout flow. It's on my list of todo tasks. Very low priority, tough.
-
If it works, please let us know. And ideally submit a pull request, if you find some time.
-
I filed an issue for this: https://github.com/thirtybees/blockwishlist/issues/7 Try to change line 370 - https://github.com/thirtybees/blockwishlist/blob/ba50a17bd794fec127e4690c224d13fb7359fd5b/blockwishlist.php#L370 from $this->smarty->assign(['wishlist_products' => false, 'wishlists' => false]); to $this->smarty->assign(['wishlist_products' => false, 'wishlists' => []]);
-
There's no reason for them to not work. However there can be some initial problems after theme installation, as many ps16 themes comes with flawed config.xml file. Thirtybees more strictly following instruction from this file - ps16 was more lenient here. Which means, after theme installation, some modules might not be enabled, and you will need to do it manually. because thirtybees uses newer smarty version than ps16, there is and infamous issue in checkout page. This bug manifests with Cannot use object of type Carrier as array error message. The issue is well understood, but unfortunately it can't be fixed in the core. It must be fixed in individual themes. Fortunately, fix is fairly simple. Note that not all themes are affected by this issue
-
Hi @haylau, thanks for the question. I'm really glad you like my module. Your use case can be done with a bit of 'datetime arithmetic'. Let me guide you through. I just implemented this on my demo server, you can have a look at list named Previous month orders only: When I run this list today (2020-06-02), I want to remove orders that: were created before the start of previous month (2020-05-01) or were created after the start of current month (2020-06-01) So I will need to add two new conditions. Let's start with the second one, because it's easier Filter out order created after the start of current month In my expressions, I will use field runtime.timestamp that contains current time. I need only a year and month parts of this date, though. To extract it, I can use function formatDate. I will use format 'Y-m' which will return year and month: formatDate('Y-m', runtime.timestamp) this will return string 2020-06 This is almost what I want. All I need to do is append static string to it: formatDate('Y-m', runtime.timestamp) + '-01 00:00:00' this will return string 2020-06-01 00:00:00 Which is the start of current month. Now, I can use this expression to include only orders created before this date. The condition will look like this: orders.created < toDate('Y-m-d H:i:s', formatDate('Y-m', runtime.timestamp) + '-01 00:00:00') I had to convert string back to datetime using toDate function, and then I can finally compare it with order creation date Filter out orders created before the start of previous month Second condition will be more complicated, because we need to figure out previous month To do this, I will once again use formatDate function, but this time I will use format 'm' to extract month part only. As of today, this format would return string '06'. I will convert string to number 6, and then substract 1: toNumber(formatDate('m', runtime.timestamp)) - 1 When I run this expression on 2020-06-02, it will return number 5, corresponding to previous month. However, if I run it on 2020-01-20, the result would be 0. That's not what I want, I need 12. To fix this, I can use simple if expression: if(formatDate('m', runtime.timestamp) == '01', 12, toNumber(formatDate('m', runtime.timestamp)) - 1) The if function takes three parameters. The first parameter must evaluate to true/false. If it evaluates to true, then the result of if function is the second parameter. If it evaluates to false, the result is third parameter. In our case -- if month part is '01' (January), the previous month is 12, otherwise the previous month is (current month - 1) Now we know the month part. We also need to figure what year is previous month in. To do so, I will use formatDate function with 'Y' format: if(formatDate('m', runtime.timestamp) = '01', toNumber(formatDate('Y', runtime.timestamp))-1, toNumber(formatDate('Y', runtime.timestamp))) This expression reads as: if current month is January, then return current year - 1, otherwise return current year. Now that we know year and month part, we can construct start of previous month. I can simply concatenate these expressions together: if(formatDate('m', runtime.timestamp) = '01', toNumber(formatDate('Y', runtime.timestamp))-1, toNumber(formatDate('Y', runtime.timestamp))) + '-' + if(formatDate('m', runtime.timestamp) == '01', 12, toNumber(formatDate('m', runtime.timestamp)) - 1) + '-01 00:00:00' The result of this expression is 2020-5-01 00:00:00 Now I can use this expression to finally create a condition to include only orders created after this date: orders.created >= toDate('Y-m-d H:i:s', if(formatDate('m', runtime.timestamp) = '01', toNumber(formatDate('Y', runtime.timestamp))-1, toNumber(formatDate('Y', runtime.timestamp))) + '-' + if(formatDate('m', runtime.timestamp) == '01', 12, toNumber(formatDate('m', runtime.timestamp)) - 1) + '-01 00:00:00') It's a little bit complicated, but fortunately it can be done.
-
Sure, you can add whatever you need to your product.tpl. Your snippet is wrong, though -- there is no opening <a href="..."> tag for the closing </a>
-
Also, I have a module named consistency checks . Maybe it will find the inconsistencies in your db