Jump to content
thirty bees forum

All Activity

This stream auto-updates

  1. Yesterday
  2. IMHO it would be better to leave Stripe and simply add some cards under it. Stripe and PayPal adds trust to your store so it should be nice to show that you process those payments with them at this step.
  3. Thanks, I made a pull request!
  4. Last week
  5. I put my money on that inside stripe's module there is a image folder where you can swap this with something sized and optimized for this place. 🙂 In this case it's /views/img/stripebtnlogo.png But keep in mind that this will be overwritten on every update.
  6. I have noticed that many customers do not actually read the text of the various payment methods but just look at the symbols. Which is why many do not realise we offer credit card payments and are unhappy. I think it would be a good idea to change the Stripe module logo with a credit card logo. Is this something @datakickwould want to introduce into the module or is it for the individual store owner?
  7. I am posting in a section called Premium module about an item called Dynamic Lists, which is the name of the module. Why should I repeat what it is in my question? Is not the purpose of separating the module section by names of the individual modules a way to signify which module each person is talking about in the respective module's thread enough or am I too dense to be here?
  8. Hi, which module ? you give no name for the module...
  9. From the description, this module appears to do something I want: Add a product to a customer's cart or order or on some sort of list if it meets certain conditions, say the customers want to subscribe to this title future volumes (I sell books). However, I am confused: I installed the module and it only asks to setup a cron. No time is mentioned (hourly, daily, weekly?). I understand I need to create the list in the Catalog portion of the menu, but how would I go about it? I look at the list definition and it is a bit unclear how I set up my conditions or if it would work at all. Thanks! C.
  10. @datakick, I think chatgpt made a working code for me but can you confirm there is something wrong in this mechanism or it's just a bug with my csv file (let's say using Cyrillic and making the encoded ajax call very big for this operation with so many lines, etc). During debuggint it advised the following is not working: Key Changes: Handling of crossStepsVariables: It now checks if crossStepsVars exists in the AJAX request and decodes it correctly. If crossStepsVars is missing or invalid, it initializes crossStepsVariables with empty arrays for groups, attributes, and deletedProducts. Extensive Logging: Logs the raw and decoded crossStepsVars at the start. Logs the final crossStepsVariables after the import step. Fallback for Missing Data: Ensures that crossStepsVariables is never empty or invalid, preventing errors in subsequent processing. Improved Structure: Cleaned up logic for handling results and reserved additional POST size for large imports. (of course I removed the logging from the following functions after debugging) Working versions for me that import the large file: public function attributeImport($offset = false, $limit = false, &$crossStepsVariables = false, $validateOnly = false) { $defaultLanguage = Configuration::get('PS_LANG_DEFAULT'); // Initialize groups $groups = is_array($crossStepsVariables) && array_key_exists('groups', $crossStepsVariables) ? $crossStepsVariables['groups'] : []; foreach (AttributeGroup::getAttributesGroups($defaultLanguage) as $group) { $groups[$group['name']] = (int) $group['id_attribute_group']; } // Initialize attributes $attributes = is_array($crossStepsVariables) && array_key_exists('attributes', $crossStepsVariables) ? $crossStepsVariables['attributes'] : []; foreach (ProductAttribute::getAttributes($defaultLanguage) as $attribute) { $attributes[$attribute['attribute_group'].'_'.$attribute['name']] = (int) $attribute['id_attribute']; } // Initialize deleted products $deletedProducts = is_array($crossStepsVariables) && array_key_exists('deletedProducts', $crossStepsVariables) ? $crossStepsVariables['deletedProducts'] : []; $this->receiveTab(); $datasource = $this->openDataSource($offset); static::setLocale(); $regenerate = Tools::getValue('regenerate'); $shopIsFeatureActive = Shop::isFeatureActive(); $lineCount = 0; for ($currentLine = 0; ($line = $datasource->getRow()) && (!$limit || $currentLine < $limit); $currentLine++) { $lineCount++; if (empty($line) || !is_array($line) || count(array_filter($line)) == 0) { $this->warnings[] = $this->l('There is an empty row in the file that won\'t be imported.'); continue; } $info = static::getMaskedRow($line); $info = array_map('trim', $info); try { $this->attributeImportOne( $info, $defaultLanguage, $groups, // by ref $attributes, // by ref $regenerate, $shopIsFeatureActive, $validateOnly, $deletedProducts // by ref ); } catch (PrestaShopException $e) { $this->errors[] = $e->getMessage(); } } $datasource->close(); if ($crossStepsVariables !== false) { $crossStepsVariables['groups'] = is_array($groups) ? $groups : []; $crossStepsVariables['attributes'] = is_array($attributes) ? $attributes : []; $crossStepsVariables['deletedProducts'] = is_array($deletedProducts) ? $deletedProducts : []; } return $lineCount; } public function importByGroups($offset = false, $limit = false, &$results = null, $validateOnly = false, $moreStep = 0) { // Check if the CSV file exists if (Tools::getValue('filename')) { $entityType = $this->getSelectedEntity(); $shopIsFeatureActive = Shop::isFeatureActive(); // If I am a superadmin, truncate table (ONLY IF OFFSET == 0 or false and NOT FOR VALIDATION MODE!) if (!$offset && !$moreStep && !$validateOnly && (($shopIsFeatureActive && $this->context->employee->isSuperAdmin()) || !$shopIsFeatureActive) && Tools::getValue('truncate')) { $this->truncateTables($entityType); } $doneCount = 0; $crossStepsVariables = []; // Get crossStepsVariables from the previous AJAX call if ($crossStepsVars = Tools::getValue('crossStepsVars')) { $crossStepsVars = json_decode($crossStepsVars, true); if (!empty($crossStepsVars) && is_array($crossStepsVars)) { $crossStepsVariables = $crossStepsVars; } else { $crossStepsVariables = ['groups' => [], 'attributes' => [], 'deletedProducts' => []]; } } else { $crossStepsVariables = ['groups' => [], 'attributes' => [], 'deletedProducts' => []]; } // Process based on entity type if (static::hasEntityType($entityType)) { $doneCount += $this->importGroup(static::getEntityType($entityType), $offset, $limit, $crossStepsVariables, $validateOnly, $moreStep); } else { // Fallback to original implementation switch ($entityType) { case static::ENTITY_TYPE_CATEGORIES: $doneCount += $this->categoryImport($offset, $limit, $crossStepsVariables, $validateOnly); $this->clearSmartyCache(); break; case static::ENTITY_TYPE_PRODUCTS: if (!defined('PS_MASS_PRODUCT_CREATION')) { define('PS_MASS_PRODUCT_CREATION', true); } $moreStepLabels = [$this->l('Linking Accessories...')]; $doneCount += $this->productImport($offset, $limit, $crossStepsVariables, $validateOnly, $moreStep); $this->clearSmartyCache(); break; case static::ENTITY_TYPE_COMBINATIONS: $doneCount += $this->attributeImport($offset, $limit, $crossStepsVariables, $validateOnly); $this->clearSmartyCache(); break; // Add other cases if needed case static::ENTITY_TYPE_CUSTOMERS: $doneCount += $this->customerImport($offset, $limit, $validateOnly); break; case static::ENTITY_TYPE_ADDRESSES: $doneCount += $this->addressImport($offset, $limit, $validateOnly); break; case static::ENTITY_TYPE_MANUFACTURERS: $doneCount += $this->manufacturerImport($offset, $limit, $validateOnly); $this->clearSmartyCache(); break; case static::ENTITY_TYPE_SUPPLIERS: $doneCount += $this->supplierImport($offset, $limit, $validateOnly); $this->clearSmartyCache(); break; case static::ENTITY_TYPE_ALIAS: $doneCount += $this->aliasImport($offset, $limit, $validateOnly); break; case static::ENTITY_TYPE_STORE_CONTACTS: $doneCount += $this->storeContactImport($offset, $limit, $validateOnly); $this->clearSmartyCache(); break; case static::ENTITY_TYPE_SUPPLY_ORDERS: $doneCount += $this->supplyOrdersImport($offset, $limit, $validateOnly); break; case static::ENTITY_TYPE_SUPPLY_ORDER_DETAILS: $doneCount += $this->supplyOrdersDetailsImport($offset, $limit, $crossStepsVariables, $validateOnly); break; } } // Handle results and progress if ($results !== null) { $results['isFinished'] = ($doneCount < $limit); $results['doneCount'] = $offset + $doneCount; if ($offset === 0) { // Compute total count only once $datasource = $this->openDataSource(0); $results['totalCount'] = $datasource->getNumberOfRows() - Tools::getIntValue('skip'); $datasource->close(); } if (!isset($moreStepLabels)) { $moreStepLabels = []; } if (!$results['isFinished'] || (!$validateOnly && ($moreStep < count($moreStepLabels)))) { $nextPostSize = mb_strlen(json_encode($crossStepsVariables)); $results['crossStepsVariables'] = $crossStepsVariables; $results['nextPostSize'] = $nextPostSize + (1024 * 64); // Reserve additional size $results['postSizeLimit'] = Tools::getMaxUploadSize(); } if ($results['isFinished'] && !$validateOnly && ($moreStep < count($moreStepLabels))) { $results['oneMoreStep'] = $moreStep + 1; $results['moreStepLabel'] = $moreStepLabels[$moreStep]; } } // Final log for current step $logMessage = sprintf($this->l('%s import'), $entityType); if ($offset !== false && $limit !== false) { $logMessage .= ' ' . sprintf($this->l('(from %s to %s)'), $offset, $limit); } if (Tools::getValue('truncate')) { $logMessage .= ' ' . $this->l('with truncate'); } Logger::addLog($logMessage, 1, null, $entityType, null, true, (int) $this->context->employee->id); } else { $this->errors[] = $this->l('To proceed, please upload a file first.'); } }
  11. Quotes don't help - the values get imported with them in the store (when the import succeeds). I managed to import few combinations but only if the file is very small (under 20 rows or so). I see that large files are split in multiple parts that are imported by ajax but I can't figure out what is breaking. So I looked at my file and found a row where a product had only color but not size associated with it (no stock is available). An easy fix - python script will exclude those and give me a list to remove them from my store. But then when I try to import the file without those unproperly formatted lines I get this error: And once again - if I make the file very small (~20 lines) it imports, but if I have 2k lines - this error appears...
  12. @312erik123 thanks, now I'll try your hint with the quotes. Regarding the position - the default demo csv gives only 0 and 1 for all positions, so I don't understand it at all. First I was thinking it was the position inside the drop down (speaking for Size attribute), later I saw on PS' forum that it is the order in which the attribute groups are shown in FO, which does not make any sense (first color, then Size, or vise versa). Then there was an opinion that they can be removed altogether and rely only on the positions inside the attribute group. Will make a shorter file and try this too. On one installation a file with ~2k rows throws this error on the 25th row, on another it does on ~1600th row. So not quite sure what is going on. Logger says only:
  13. Hello! I havn't fully understood the combination import, but I've found a few ways to make it work. First of, when you come to the second stage, i.e after you click import - does all the columns match the data? Secondly, I have found that I sometimes need to put the data in quotes - especially if its data with commas and dots etc. Also regarding the position value, i believe thats how it will be shown in your store. So if color has position one, and size position two, it will be shown in that order.
  14. I'm trying to make a python file that matches two files with information and generates me a CSV to import in my site. The output is as follows: But it can not be imported because of the following error: Errors occurred: Property ProductAttribute->name is empty I'm trying the following settings for Combinations import: Does anybody have some ideas? Also - what is the purpose of position value in Attribute and Value columns? I believe they should not increase per same product reference (according to the demo csv).
  15. Post the solution here. Most of the time production shops have issues and need a solution fast.
  16. Never mind. Figured it out. If someone wants a solution, just hit me up.
  17. Earlier
  18. I used the installer that I downloaded from here for PHP 7.4. I noticed the empty tables but figured tiwas because of my theme. I installed another version of TB on another subdomain to see if I could copy the entity tables but they were empty too, despite not installing my theme and keeping the native theme Niara... Anyhow, managed to make it work with your help guys. Thankyou!
  19. Well, it's definitely a blocker. When system tries to generate thumbnails for products (or other entities), it look into db for any image types assigned to image entity. If image entity is missing in DB, no image type will be returned, and no thumbnail will be generated. So, having image entity table populated, and having image types associated with image entities, is a prerequisite.
  20. Will this solve the issue with non regeneration of thumbnails?
  21. Image entity table should be initialized during update by core updater. Did you use core updater to update to version 1.6? Anyway, here what you could do: use core updater and check for database differences in core updater settings, enable Developer mode. Then open Developer tab, and run 'Initialize codebase' process. if nothing helps, you can manually add entries to db tables. Script: INSERT INTO `tb_image_entity` (`id_image_entity`, `name`, `classname`) VALUES (1, 'categories', 'Category'), (2, 'categoriesthumb', 'Category'), (3, 'manufacturers', 'Manufacturer'), (4, 'products', 'Product'), (5, 'scenes', 'Scene'), (6, 'scenesthumb', 'Scene'), (7, 'stores', 'Store'), (8, 'suppliers', 'Supplier'); INSERT INTO `tb_image_entity_lang` (`id_image_entity`, `id_lang`, `display_name`) VALUES (1, 1, 'Categories'), (2, 1, 'Categories Thumbnails'), (3, 1, 'Manufacturers'), (4, 1, 'Products'), (5, 1, 'Scenes'), (6, 1, 'Scenes Thumbnails'), (7, 1, 'Stores'), (8, 1, 'Suppliers'); INSERT INTO `tb_image_entity_lang`(id_image_entity, id_lang, display_name) SELECT iel.id_image_entity, l.id_lang, iel.display_name FROM `tb_image_entity_lang` iel JOIN `tb_lang` l WHERE l.id_lang != 1;
  22. I don't want to spam this topic with off-topic, so just quickly -- there is a Purchases module that can quite nicely handle the purchase orders. It's intended to be used with (upcoming) warehouse management system, but can be used separately as well
  23. Currently migrating as much as I can to TB 1.6 and I decided to use Bees Blog instead of the one we used to have, ybc_blog, which has become bloated, takes forever to load and does not do very well what we need to do legally, which is have only French content on the French side. It looked great though. It was a bit of sql gymnastics but we managed to migrate our nearly 4000 blog posts in two different languages and match them properly - awesome job Beesblog! However, on the blog page, it gets pretty ugly with the pagination: see attachment. How can I fix this in the module so it is a bit more manageable, less insane and ugly. Thanks! C.
  24. Those exist and they match the theme, but there are entities tables in the database that are empty. Could permissions be an issue? Since this is a migration... I thought I had fixed them but there are so many images.
  25. Here is my configuration that works for Warehouse theme. Your theme should be similar (sizes are dependent on your theme so no need to change them as they should be left as the theme configured them when you updated to 1.6, only fix the entities). But I can't remember if this will fix your issue - the entities are used to show the already generated images I think in front office. Nevertheless it should be configured so go ahead and test, hopefully datakick can join with master suggestion for this issue.
  26. No overrides related to images. No errors. No popups. Image Entities are not configured - they ahve a value of zero. How do I do that? I am using my own theme, not the TB theme, so it might be related to that?
  27. Don't use any PS plugins related to images on TB 1.6. This section was totally rewritten and the plugins are 99.9% not compatible. In order to debug the issue - first check if there are any overrides remaining related to images when you remove the modules. Are there any errors, do you see any popup messages when regenerating? Do you have your Image Entities column configured (this is needed so the system know where to show what).
  28. Hello! Trying to migrate to 1,.6 and I cannot regenrate a single image in the new version. I even tried two plugins to regenerate and they all do the same thing: stop right away or mention there is an error with the images.I tried jpg and webp, no success. The only image I was able to regenerate with one ofthe plugin was a <scene< image. All the others say error and the other module and the native TB interface just do nothing. I tried reinstalling my theme, thinking it was the issue, but apparently not.
  1. Load more activity
×
×
  • Create New...