

Rhapsody
Trusted Members-
Posts
93 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Gallery
Downloads
Articles
Store
Blogs
Everything posted by Rhapsody
-
[Solved] 1.1.x Bleeding Edge - Cart error message on Carrier(s) & Weight
Rhapsody posted a question in Bug Reports
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: 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.
-
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; }
-
How to make invoice number go up by 2 each order
Rhapsody replied to Fernando's topic in Tips and Tricks
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. -
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.
-
@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?
-
How to make invoice number go up by 2 each order
Rhapsody replied to Fernando's topic in Tips and Tricks
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); } } -
@Chandra 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.
-
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 all_files_hide_qty_mod.zip
-
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.
-
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