Jump to content
thirty bees forum

Quant

Trusted Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Quant's Achievements

Newbie

Newbie (1/14)

  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

4

Reputation

  1. Should I use the latest version of MariaDB or use the version that Debian 11 offers? Who uses what?
  2. I wanted to say that there is no need to make another version of TB (I am a seller (and understand a little in development)). Sellers need functionality stability, developers also don't need to make frequent updates. --- Sorting It is necessary to add the display of goods to the basic functionality - in stock or not. Where? There are a lot of solutions. If the "respected" decides to do it himself, you must remember to look, there are a lot of nuances. This is one of the most requested features! --- You want to display multiple images in FO. The "getProductProperties" method generally needs to be divided into separate parts for getting the character, images, formatting, etc. It will be more convenient to override. In general, such functionality needs to be obtained through "ProductPresenter ()" (it needs to be done for TB as well), well, everyone needs to think about what he should decide. It is necessary to display its variants in the listing in the product card - Color: Black: Green: Red, etc. --- I am against any functionality of getting Goods in FO, which is not included in the core. Maybe you need to create Product :: getNewProductList (etc.): ProductIterator Do you want to do optimization? At the iteration stage? --- Mail -> for new versions OrderState :: mail or a stub for those you don't understand. But it's better to make a Notification class. Mail -> queue. --- All salespeople have different needs. I want the engine to be fast!
  3. Sorry for GoogleTranslate. - Now, there is no need to complicate the functionality of the core and base theme, which is backward compatible with Prestashop 1.6. I understand that the point of backward incompatibility is implemented in version 1.3 and above. I could be wrong. Watching github and "Datackick" posts all your wishes will be implemented in version 31.0.0 :). --- The "Mail" class is the best way to do it. Put everything in one method. The path of the classes themselves define the functionality - Order :: sendMail, OrderState :: sendMail. And sending letters only in the background (queue) - devSprint03! Using a webtrigger is crazy, needs some work! You can add the "Notificaton" class. --- All that concerns redefining the output of products in FrontOffice should be done by modules. But - we need one more class for displaying products in FO, which modules should also use - maybe "ProductIterator" or "CatalogProduct". --- The checkout process should be spared from the buyer's registration choice. The main thing for the seller is to receive the order and data for communication with the buyer! You can extend the "Customer" class, add a phone. Use the "Address" class as a proxy. Depending on the type of delivery or secondary to the country, use the mandatory fields of the "Address" model. pickup => Address - false invoice_address AS shop address from Config mycountrylocaldelivery => Address - true invoice_address AS moduleCarrier - Carrier api etc. :) --- If you can do a Fast (basic or not) method "Product :: getProducts (array $ withFeature = [])" - that's cool! --- Better to keep the core functionality of the store simple and straightforward. Expand with modules. And it's time to think about "CSS" and "JAVASCRIPT" for the base theme to function!
  4. Extend class Feature Together with "Multiple feature values" you can extend the feature class. Add flag to show or not in Front office. So they can be divided into service ones and those that are used only by the filter. Because many people write conditions in templates so as not to show some features. Minimum of fixes. class FeatureCore extends ObjectModel { // 'show_on_front' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => false, 'dbDefault' => '1'], public $show_on_front = 1; //add condition (show_on_front = 1) Feature::getFeaturesForComparison Product::getFeaturesStatic Product::getFrontFeaturesStatic Better yet, add the "prefix" and "suffix" fields. For example, they can contain the name of the style, the type of value, the name of the picture, etc. Each theme developer can decide how to use them. class FeatureCore extends ObjectModel { // 'prefix' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => false, 'size' => 64, 'dbNullable' => true], public $prefix; // 'suffix' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => false, 'size' => 64, 'dbNullable' => true], public $suffix; I understand that there is a lot of work, but it would be cool :)
  5. Which database? When viewing or printing PDF, the current one is used (TEXT_FROM_CURRENT_TB_DELIVERY -> delay). What you want will require a lot of code editing! Option. Save Adresse -> $ other = 'Als mein benutzerdefinierter Text' Delay, replace Verzögerung with Adresse -> $ andere.
  6. My solution: class Cart extends CartCore { public function getDeliveryOptionList(Country $defaultCountry = null, $flush = false) { // array lang (id_lang => text) $delay = [ 1 => 'My text delay!', ]; $deliveryOptionList = parent::getDeliveryOptionList($defaultCountry, $flush); foreach ($deliveryOptionList as $idAddress => $deliveryOption) { foreach ($deliveryOption as $key => $value) { foreach ($value['carrier_list'] as $idCarrier => $data) { // override Carrier if (2 == $idCarrier) { $deliveryOptionList[$idAddress][$key]['carrier_list'][$idCarrier]['instance']->delay = $delay; } } } } return $deliveryOptionList; } }
  7. Inventory management is enabled in my store and it is not allowed to order with zero stock. One page checkout enabled. PS_STOCK_MANAGEMENT = 1 PS_ORDER_OUT_OF_STOCK = 0 PS_ORDER_PROCESS_TYPE = 1 TB_VERSION = 1.1.0-1.1.x Bleeding edge THEME - Niara -------- The following happens: Product A has 10 units remaining. Customer1 puts all 10 units in the cart yesterday and stops. Today Customer2 comes in and buys Product A in the amount of 4 units. After that, today Customer1 continues ordering, enters the Cart and sees that 10 units are available. The real balance of Product A is already 6 units. Until he saves the account, he does not see a warning about the lack of quantity of Item A. Ok, he saved the account and sees a warning: An item (Product A) in your cart is no longer available in this quantity. You cannot proceed with your order until the quantity is adjusted. Ok, but he doesn't understand how much he needs to change the quantity. In the Shopping Cart, he clicks the Downgrade button and sees the message: There aren't enough products in stock. He doesn't know what to do. It is better to fix this behavior of the Shopping Cart. P.S. For myself, as a temporary solution, I fixed the processChangeProductInCart method in the Cart class. If the real balances of the goods are already less, to check ($ qtyToCheck) set the real quantity. We decrease the quantity ($ this-> qty) by the difference between the quantity in the basket and the real quantity, or if the actual quantity is less than or equal to 0, then we will remove the item from the cart. if (Tools::getValue('op', 'up') == 'down') { //$qtyToCheck -= $this->qty; if ($cartProduct['stock_quantity'] < $cartProduct['cart_quantity']) { $this->qty = ($cartProduct['stock_quantity'] > 0) ? $cartProduct['cart_quantity'] - $cartProduct['stock_quantity'] : -1; $qtyToCheck = $cartProduct['stock_quantity']; $this->ajax_refresh = true; } else { $qtyToCheck -= $this->qty; } } else { $qtyToCheck += $this->qty; }
  8. We get the wrong redirect with index.php?controller=AdminFeatures&id_feature=1&viewfeature&token=64b5166a96bdea51c7bb9a746b2dabfd on the index.php?controller=AdminFeatures&token=64b5166a96bdea51c7bb9a746b2dabfd&submitFilterfeature_value=2#feature_value Change the line in the AdminFeaturesController if (Tools::getIsset('submitFilter')) { on the if (Tools::getIsset('submitFilter'.$this->list_id)) { It works now.
  9. I agree. In my situation, I could not find a better solution than to write such overrides. Will have to live with them. Of course, it's better not to delete the small type 😞
  10. In the AdminProducts controller we have a small picture type. If this type is not or is it disabled for products? The initFormAttributes and initFormImages functions have a line that probably does not work correctly: $type = ImageType::getByNameNType('%', 'products', 'height'); //won't find anything it's better this way $type = ImageType::getByNameNType('*', 'products', 'height'); //will show first In initFormInformations (for inserting pictures in the description), the type small is also hardcoded: //type (small) as constant foreach ($images as $k => $image) { $images[$k]['src'] = $this->context->link->getImageLink($product->link_rewrite[$this->context->language->id], $product->id.'-'.$image['id_image'], ImageType::getFormatedName('small')); } it's better this way //better to find from what is $imageType = (ImageType::getImagesTypes('products'))[0]['name'] ?? 'Unknow'; foreach ($images as $k => $image) { $images[$k]['src'] = $this->context->link->getImageLink($product->link_rewrite[$this->context->language->id], $product->id.'-'.$image['id_image'], ImageType::getFormatedName($imageType)); } In my store (TB with the latest bleeding edge update) I do not use the "small" type. These fixes work for me. Maybe it should be for everyone.
  11. I want to redefine the templates for the default BO theme, for example _PS_BO_DEFAULT_THEME _. '/template / footer.tpl'. Then in AdminController :: display () the wrong folder paths are retrieved. // Check if header/footer have been overriden $dir = $this->context->smarty->getTemplateDir(1);//.'controllers'.DIRECTORY_SEPARATOR.trim($this->override_folder, '\\/').DIRECTORY_SEPARATOR; $moduleListDir = $this->context->smarty->getTemplateDir(1).'helpers'.DIRECTORY_SEPARATOR.'modules_list'.DIRECTORY_SEPARATOR;
  12. This is probably the wrong context for "this" inside the "each" function. If you return it as it was in Prestashop, then there will be no error: function updateInvoice(invoices) { // Update select on product edition line $('.edit_product_invoice').each(function () { var selected = $(this).children('option:selected').val(); $(this).children('option').remove(); //$.each(invoices, function (i) { for(i in invoices) { // Create new option var option = $('<option>' + invoices[i].name + '</option>').attr('value', invoices[i].id); if (invoices[i].id === selected) { option.attr('selected', true); } $(this).append(option); } //}); }); // Update select on product addition line $('#add_product_product_invoice').each(function () { var parent = $(this).children('optgroup.existing'); parent.children('option').remove(); $.each(invoices, function (i) { // Create new option var option = $('<option>' + invoices[i].name + '</option>').attr('value', invoices[i].id); parent.append(option); }); parent.children('option:first').attr('selected', true); }); // Update select on product addition line $('#payment_invoice').each(function () { $(this).children('option').remove(); //$.each(invoices, function (i) { for(i in invoices) { // Create new option var option = $('<option>' + invoices[i].name + '</option>').attr('value', invoices[i].id); $(this).append(option); } //}); }); } Whoever knows Javascript can confirm this?
  13. When I add or remove an item to a BO order I get the following Javascript error: In Chromium 79.0.3945.79 (Официальная сборка), Built on Ubuntu , running on Ubuntu 18.04 (64 бит) or Windows 7 Google Chrome 79.0.3945.130 jquery-1.11.0.min.js?ts=1564066310:3 Uncaught TypeError: Cannot read property 'createDocumentFragment' of undefined at eb (jquery-1.11.0.min.js?ts=1564066310:3) at Function.buildFragment (jquery-1.11.0.min.js?ts=1564066310:3) at e.fn.init.domManip (jquery-1.11.0.min.js?ts=1564066310:3) at e.fn.init.append (jquery-1.11.0.min.js?ts=1564066310:3) at Object.<anonymous> (orders.js?ts=1580215242:59) at Function.each (jquery-1.11.0.min.js?ts=1564066310:2) at HTMLSelectElement.<anonymous> (orders.js?ts=1580215242:52) at Function.each (jquery-1.11.0.min.js?ts=1564066310:2) at e.fn.init.each (jquery-1.11.0.min.js?ts=1564066310:2) at updateInvoice (orders.js?ts=1580215242:48) eb @ jquery-1.11.0.min.js?ts=1564066310:3 buildFragment @ jquery-1.11.0.min.js?ts=1564066310:3 domManip @ jquery-1.11.0.min.js?ts=1564066310:3 append @ jquery-1.11.0.min.js?ts=1564066310:3 (anonymous) @ orders.js?ts=1580215242:59 each @ jquery-1.11.0.min.js?ts=1564066310:2 (anonymous) @ orders.js?ts=1580215242:52 each @ jquery-1.11.0.min.js?ts=1564066310:2 each @ jquery-1.11.0.min.js?ts=1564066310:2 updateInvoice @ orders.js?ts=1580215242:48 success @ orders.js?ts=1580215242:557 j @ jquery-1.11.0.min.js?ts=1564066310:2 fireWith @ jquery-1.11.0.min.js?ts=1564066310:2 x @ jquery-1.11.0.min.js?ts=1564066310:4 b @ jquery-1.11.0.min.js?ts=1564066310:4 XMLHttpRequest.send (async) send @ jquery-1.11.0.min.js?ts=1564066310:4 ajax @ jquery-1.11.0.min.js?ts=1564066310:4 (anonymous) @ orders.js?ts=1580215242:542 dispatch @ jquery-1.11.0.min.js?ts=1564066310:3 r.handle @ jquery-1.11.0.min.js?ts=1564066310:3 In Firefox 72.0.1 (64-bit) on Ubuntu 18.10: TypeError: a is undefinedjquery-1.11.0.min.js:3:15071 jQuery 4 eb buildFragment domManip append updateInvoice http://tb110.local/js/admin/orders.js?ts=1580215242:59 each jQuery updateInvoice http://tb110.local/js/admin/orders.js?ts=1580215242:52 jQuery 2 each each updateInvoice http://tb110.local/js/admin/orders.js?ts=1580215242:48 success http://tb110.local/js/admin/orders.js?ts=1580215242:557 jQuery 4 j fireWith x b My shop is Thirtybees 1.1.x Bleeding Edge last release. Files are not modified. Someone can check the addition or removal of goods in your order.
  14. We have two ajax functions (ajaxProcessAddProductOnOrder, ajaxProcessEditProductOnOrder) to edit and add goods from BO that use the ./orders/_product_line.tpl template but do not define $product['customized_product_quantity']. Accordingly, we have such a message in the error log: 2020/01/28 13:29:47 [error] 675#675: *124 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: customized_product_quantity in /home/vagrant/public_html/cache/smarty/compile/7c/80/09/7c80093774885aab8180ca74c940683e358afd6d_0.file._product_line.tpl.php on line 133PHP message: PHP Notice: Undefined index: customized_product_quantity in /home/vagrant/public_html/cache/smarty/compile/7c/80/09/7c80093774885aab8180ca74c940683e358afd6d_0.file._product_line.tpl.php on line 133"
  15. Yes. My currently php version: PHP 7.3.10-1+0~20191008.45+debian9~1.gbp365209 (cli) (built: Oct 8 2019 05:48:14) ( NTS )
×
×
  • Create New...