

Rhapsody
-
Posts
98 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Gallery
Downloads
Articles
Store
Blogs
Posts posted by Rhapsody
-
-
5 hours ago, toplakd said:
For finding out which files were modified you can copy whole modded folder into community-theme-default and check differences with core updater.
Thanks - cool method to find changes!
For those interested, the attached text file shows the result listing the changed files toplakd modded.
-
18 hours ago, toplakd said:
Updated first post, with theme file for download
@toplakd - Thanks for this! I downloaded and on the next rainy day will start testing on one of my shops. Would it be possible to list the 1.1.0 theme files you changed? That will make it easier to integrate with the mods I have already done.
-
What theme are you using? I had a similar problem with a modified community default theme and found the solution in this post.
-
Sorry for the delayed reply - I didn't get an automatic notification. Thanks for the tip. I found the problem was an older order-carrier.tpl in my customized theme. This file is not changed in my customized theme. Using the file from 1.1.0 fixed it.
On 5/7/2020 at 8:28 AM, toplakd said:Have you tried 1.1.x together with latest community theme? (not ignoring theme in core updater)
-
I get the following error displayed for the cart using Bleeding Edge 1.1.x for a shop that works fine with 1.1.0 Stable.
The product selection cannot be delivered by the available carrier(s): it is too heavy. Please amend your cart to lower its weight.
I'm using a the Community Theme Default that I've modified and have some overrides. This error is displayed with the overrides turned off and the cache cleared.
If developers would like me to investigate, please post what you would like to see and I can run tests and posts results. It isn't a problem for me because the shop works fine with the 1.1.0 stable release. I was just trying the bleeding edge release.
-
Thanks datakick. I created an override and it works better.
Is there a way I can pre-build the product page cache for each user?
-
One of the sites I have running TB Bleeding Edge 1.1.0-1.1.x, PHP 7.1.33 on GoDaddy hosting. When I load a product that has multiple dropdown options, the cache significantly speeds up the page load when not logged in. Once logged in, the page load does not seem to cache and takes forever to load. This uses a modified Community Theme. This is a link to the product page: https://twentyhundredclub.org/shop/dues-membership-swag/58-membership-race-package.html
The cache settings are as follows:
- Never Recompile Template
- Cache - Yes
- Caching Type - File System
- Combinations & Customer Groups Disabled, Features Enable
- All CCC set to Yes
- Server Side Caching - Yes
- APC (APCu enabled in PHP)
- Use Full Page Cache - Yes
- The following Controllers are Cached: category, cms, compare, contact, favicon, index, newproducts, pagenotfound, product
Any suggestions on what needs to be done to speed up the product page when logged in?
-
lesley,
Thanks for the comment. The +4 is used for the automated mail sorting at the postal centers so it does help. This from the USPS website:
QuoteThe ZIP+4® Code assigned by the Postal Service™ is unique for the category of Reply Mail you use. This unique ZIP+4 code enables Reply Mail to be sorted on postal automated equipment by specific size and weight (i.e., cards, 1oz. letters, 2 oz. letters, etc.).
The problem with not having both formats available is when a user saves a format that is not validated, it gives an error. Currently only a single format is validated. I am going to play with some ideas on how two formats may be saved and validated. Possible save two formats in the definition field using a comma seperator. During the check, if a comma is detected in the definition field split into two instances and check if either validates properly.
Once I have a working concept, I'll post here for comments.
8 hours ago, lesley said:In the US people do not normally use the dash 4 digits. Some do, just because it is store from some other transaction. Since the US is one of the only countries with this zip code issue, if it bothers you I would handle it at the template level. Just split the string at the - and drop the extra 4 digits and the dash. They add no value in either delivery or tax collection.
-
Which file is used to validate the postal codes? I'll take a look at that.
never mind - I found it in classes/validate.php
This is the current code used to validate
/** * Check for zip code format validity * * @param string $zipCode zip code format to validate * * @return bool Validity is ok or not * * @since 1.0.0 * @version 1.0.0 Initial version */ public static function isZipCodeFormat($zipCode) { if (!empty($zipCode)) { return (bool) preg_match('/^[NLCnlc 0-9-]+$/', $zipCode); } return true; }
20 hours ago, the.rampage.rado said:In the current situation - it cant' be done.
If you like you can make a PR @github with the preffered version but consider not only your case but any other use scenario that may arrise. If NNNNN is the US standard I would like to leave it as is. I have shipped to USA and Costa Rica with no problem with only NNNNN. -
4 hours ago, DRMasterChief said:
Hi, you can use this module, works with tb: http://greenmousestudio.com/en/numeric-reference/
It appears that is for order numbers, not the invoice numbers as the OP requested. A similar override can be done as the one above in Order.php if sequential order numbers are desired instead of the random letters.
-
Just now, toplakd said:
There will be no overrides with the theme, so no such function that requires overrides will be added/included.
No problem! Just offering it up as an option people may use. I like what you are doing and look forward to when files are available.
-
1
-
-
7 minutes ago, toplakd said:
It's always good that you do all the upgrades and fixes on spare copy of your live shop, so you can check if everything works as it should.
@toplakd
How does the Bleeding Edge channel work? for example I see issue-289, issue-396 ... in the Core Updater dropdown list. Does each update need to be installed manually, or is there a way to get them all at once?
-
I believe you can create an override as override/classes/order/Order.php and change the increment value from 1 to 2
This code hasn't been verified but should be close to what you need.Edit: I verified this on a test shop and it works.
<?php /******* * Override Created from Thirty Bees Order.php to increment invoice numbers by 2 * ****** */ class Order extends OrderCore { /** * @param int $orderInvoiceId * @param int $idShop * * @return bool * @throws PrestaShopException */ public static function setLastInvoiceNumber($orderInvoiceId, $idShop) { if (!$orderInvoiceId) { return false; } $number = Configuration::get('PS_INVOICE_START_NUMBER', null, null, $idShop); // If invoice start number has been set, you clean the value of this configuration if ($number) { Configuration::updateValue('PS_INVOICE_START_NUMBER', false, false, null, $idShop); } $sql = 'UPDATE `'._DB_PREFIX_.'order_invoice` SET number ='; if ($number) { $sql .= (int) $number; } else { // Find the next number (***line below was + 1 changed to + 2 to increment by 2****) $newNumberSql = 'SELECT (MAX(`number`) + 2) AS new_number FROM `'._DB_PREFIX_.'order_invoice`'.(Configuration::get('PS_INVOICE_RESET') ? ' WHERE DATE_FORMAT(`date_add`, "%Y") = '.(int) date('Y') : ''); $newNumber = DB::getInstance()->getValue($newNumberSql); $sql .= (int) $newNumber; } $sql .= ' WHERE `id_order_invoice` = '.(int) $orderInvoiceId; return Db::getInstance()->execute($sql); } }
-
2 hours ago, Chandra said:
Thanks for your effort on the community theme!
Do you need the 'In Stock' labels on the cart summary?A couple of thoughts if you are able to consider:
- Add to cart button on the product list page should show always, and not just show on hover. It is a major pain to add a product to cart on mobiles on community theme (Niara does this better).
-
The popup screen after each product added to cart is unnecessary. A simple message that disappears in a few seconds confirming the product was added to cart will be much more elegant. Some sites have a small animation that shows the product moving to the cart.
If a customer is adding 10 products to cart now, he has to dismiss the screen 10 times - it is almost like encouraging the customer to stop shopping and go checkout.
I shall put these point somewhere on a dedicated thread but I wanted to raise them to you too. Thanks.
All good comments. I made a slightly different approach before adding to cart and agree your approach for adding to cart would be beneficial.
- For Desktop Display each item in the product list page displays the label "Choose Options" or "Buy Now", depending if there are options to select. Mouse over the product highlights the area with a link to open the product. Add to cart is never shown on the product list page. This was done via mods to product-list-items.tpl and translations. See screenshot #1 below showing the 1st item with mouse over. Screenshot #2 is a phone display.
- Once the product is opened, for any item that displayed "Choose Options" add to cart is not displayed until the customer makes selections using the dropdowns. The product is setup with quantities and 0 stock values assigned to options that are not available to purchase. Once values are selected that are available, the "Add to cart" button is displayed. See screenshot #3 displayed when product is 1st opened, and #4 when required selections made.
-
55 minutes ago, VinceMax said:
@Rhapsody
I'm interested to have a look at the modified files you mentioned. Sounds like a great feature.
Could you please post a link to the files for trying out.
Thanks A lot.
Vince
Vince,
The attached zip file has all the hide quantity mods in a directory structure that includes overrides and modified Community Theme template files. Looking at the files, I did not mod the shopping cart templates listed above as I thought.
You'll need to use phpMyAdmin to add the field hide_qty to the product table. Make it field type TINYINT with a field length 1
Make sure you clear the cache and delete the cache file class_index.php
-
toplakd - the screen shots look great! Some questions:
- Which template and css files are you changing?
- Any module files too?
- When do you think you'll have files available for people to try it?
I've created override files that add custom variables to products. One override adds a variable $hide_qty that allows hiding the quantity and forcing it to 1 for products such as annual membership. This prevents people from changing the quantity for products marked as "Hide Quantity" but does allow the product to be deleted from the cart. The product in the back office has a check box to enable or disable the cart quantity. Modified files include:
- override\classes\Product.php
- override\controllers\front\ProductController.php
- override\controllers\admin\AdminProductsController.php
- override\controllers\template\products\informations.tpl (changes back office product page to provide a checkbox that enables or disables quantity in the front)
Theme files changed:
- product.tpl
- shopping-cart.tpl
- shopping-cart-product-line.tpl
If you are interested to include this feature with your mod, I'd be happy to post the annotated files. In addition to that mod, I made changes to eliminate the "Save" button for text fields and uploaded images. This only works for non-ajax carts and is based on previous documented mods for PS 1.6.
-
On 4/9/2020 at 4:31 PM, colorful-ant said:
optionally leave the zip code field empty and save it
I am aware of this option but would rather have the input validated.
-
The zip/postal code in the US has the basic 5 digit code ( e.g. 12345) and an optional suffix with a hyphen followed by 4 digits (e.g. 12345-1234). Is there a method to validate both formats when an address is entered? Setting either format in the Country works, but only a single format is validated.
-
👍 on the icons. I took the exact same approach on a WordPress plugin I wrote. It displays a simplified icon menu with the full menu available on the far right icon for mobile devices and the normal text menu for desktops. User feedback was positive.
I am interested in your results for both the restyled cart and icons as I have three shops based on the Community Theme that I've modded and see that the changes you have so far would be beneficial.
Nice work!
-
One thing to be careful about is if you have overrides and theme customizations. I debugged two problems after transitioning from PS. One with Mail Alerts not sending emails and the other with PDF causing a database exception. It turns out I had files in the original PS Community Theme customization and some overrides I had that were the problem. Use the debug feature under the Advance Parameters, Performance to help find any problems. I was able to update the files so all works fine.
-
Reading this I had a similar problem. I ended up resetting the four dashboard modules and the problem was fixed.
BO - Modules -> Dashboard (on left menu) shows the 4 dashboard modules. Click the dropdown on each and select Reset
-
Nemo has a blog post that works for preventing these types of spam. It was written for PS but I am using it successfully in TB 1.0.8 as an override for ContactController.php
http://nemops.com/blocking-spam-emails-in-prestashop/#.Xm7Zx6hKiUk
-
1
-
Chinese spam from qq dot com through contact form
in English
Posted
FYI the override that Nemo developed for Prestashop in my post above has worked very well to stop spam messages on the contact form and is running on 3 shops with 1.1.x bleeding edge. It stopped the qq dot com spam and others I was getting such as talkwithlead dot com. I filter all .ru and .cn emails since on my shops there is no chance for legitimate traffic. It also allows capturing key words to filter and kill such as the current list I occasionally edit in the override:
$banned_in_email = ['.ru', 'qq.com', '.vn', 'talkwithlead.com', 'talkwithwebvisitor.com', '.club', '.cn', 'arteseo.co'];
$banned_content = ['email marketing', 'quotation', 'SEO', 'advertising', 'Clicks', 'Guaranteed', 'diet', 'sex', 'prices', 'unlimited', 'medical'];