Jump to content
thirty bees forum

the.rampage.rado

Silver member
  • Posts

    1,145
  • Joined

  • Last visited

  • Days Won

    97

Everything posted by the.rampage.rado

  1. Do you have some custom js code? The issue is not only on mobile browsers but if you click on mobile view in your desktop browser too. So something is acting funny. In my test instance I just switched to Niara and I'm able to add to cart from this list. You also have 2 console errors - piwik is failing to load - temporarily disable it (very little chance it is causing the issue) and one more error with front.js that I'm unable to figure out.
  2. I doubt the issue is the age of the OS. By any chance the js is disabled on this mobile browser?
  3. Also give more details what hosting do you use - shared, dedicated, virtual server, etc. So we can tell you how to fix this. In general you have to create mysql user and associate your table with this user with all privileges.
  4. You can edit/add/remove CMS pages at Preferences->CMS and you can control which ones to display in the footer at Modules->Block CMS
  5. Preferences->Themes->Advanced Options button (bottom right) You can select on which pages you want which columns. Clear the cache after this change.
  6. What did the module developer said? My module works as expected without any modifications.
  7. Click the last option and you wont see those for a month. I would not call them 'nag boxes' more like 'an open source project that probably makes you a decent amount of money needs your support' boxes. Do you like the facelift of BO that came with this change?
  8. The values on the installation I was testing my code were not ordered...
  9. Just a quick question - if you add your attributes in random order in BO so they look like this in Product->Attributes: You see them in FO ordered, right? EDIT: just tested a brand new install - yes, they are ordering in FO.
  10. Thanks. I'll have to dig and find what have I done to mess this up.
  11. Thanks for your reply! It does not sort them. They are displayed in the order I have added them to the product: I was under the impression that the drop-down is also sorted but no, when I add them assorted in BO, they appear assorted in FO.
  12. Something that I think is working, of course not perfect as some things are done in js and not at backend but... Warehouse's product.tpl {elseif ($group.group_type == 'radio')} <div id="product-options"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <input type="radio" id="attribute_{$id_attribute}" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} hidden /> <label for="attribute_{$id_attribute}" class="btn {if $group.default == $id_attribute}active{/if}"> <span class="label-text">{$group_attribute|escape:'html':'UTF-8'}</span> </label> {/foreach} </div> {/if} css: /* Warehouse buttons css START */ /* Ensure buttons behave like inline blocks and center content */ #product-options .btn { display: inline-block; padding-left: 10px !important; padding-right: 10px !important; text-align: center; border: 1px solid #ccc; border-color: #ccc; background-color: white; color: #333; font-weight: normal; margin: 3px; min-width: 65px; white-space: nowrap; transition: background-color 0.3s ease; outline: none; box-shadow: none !important; } /* Style for the selected state (checked radio button) */ #product-options .btn.active { background-color: #55c65e; color: white; } /* Hover effect for inactive buttons */ #product-options .btn:hover { background-color: #d3d3d3; } /* Style the radio button (which is hidden) */ #product-options input[type="radio"] { position: absolute; opacity: 0; } /* Ensure uniform text size */ #product-options .btn .label-text { display: inline-block; width: 100%; text-align: center; } /* Warehouse buttons css END */ js: $(document).ready(function () { // Handling click events for selecting attributes $('#product-options .btn').on('click', function () { $(this).siblings('.btn').removeClass('active'); $(this).addClass('active'); $(this).prev('input[type="radio"]').prop('checked', true).trigger('change'); // Trigger PrestaShop's findCombination to update the combination details findCombination(); }); }); I would like to move the sorting to BO but for now it is what it is. EDIT: Corrected code as there was no need to reorder using js.
  13. I asked if you have checked for core changes against 1.1 in core updater, i don't see if you did try to check that. Don't update, just check for changes.
  14. I've been playing around with this idea for 2 days. Up until now I've always used dropdowns for my size selections but I would like to make them buttons. Of course thirty bees does not offer such thing currently. I tried editing the radio button case in product.tpl to display bootstrap buttons and hide the circle. Some js, some css and it works for Niara: Product.tpl changes: {elseif ($group.group_type == 'radio')} <div id="product-options" class="btn-group" data-toggle="buttons"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <label class="btn btn-outline-primary {if ($group.default == $id_attribute)} active{/if}" for="group_{$id_attribute}"> <input type="radio" id="group_{$id_attribute}" class="d-none" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} autocomplete="off"> {$group_attribute|escape:'html':'UTF-8'} </label> {/foreach} </div> {/if} Additional css in my example to make them 'table-like' (when I have mutliple sizes): /* Ensure buttons behave like inline blocks and center content */ #product-options .btn { display: inline-block; /* Inline block to align buttons horizontally */ padding-left: 10px !important; padding-right: 10px !important;/* Adjust padding as needed */ text-align: center; /* Center text horizontally */ border: 1px solid #ccc; /* Border style */ background-color: white; /* Background color */ color: #333; /* Text color */ border-radius: 3px; /* Rounded corners */ margin: 3px; /* Space between buttons */ min-width: 65px; /* Ensure minimum button width */ white-space: nowrap; /* Prevent text wrapping */ transition: background-color 0.3s ease; /* Smooth background transitions */ outline: none; /* Remove focus outline */ box-shadow: none !important; /* Remove any shadow */ } /* Style for the selected state (checked radio button) */ #product-options .btn.active { background-color: #43b775; /* Green background for active buttons */ color: white; /* White text for active buttons */ border-color: #ccc; /* Keep the border color unchanged */ box-shadow: none !important; /* Remove any box-shadow on active buttons */ } /* Hover effect for inactive buttons */ #product-options .btn:hover { background-color: #d3d3d3; /* Light grey background on hover */ color: #333; /* Keep the original text color on hover */ border-color: #ccc; /* Keep the same border color as unselected buttons */ box-shadow: none !important; /* Remove any box-shadow on hover */ } /* Remove the black frame (focus outline) */ #product-options .btn:focus, #product-options .btn:active { outline: none; /* Remove the black focus/active border */ box-shadow: none !important; /* Remove any shadow effect */ } /* Style the radio button (which is hidden) */ #product-options input[type="radio"] { position: absolute; opacity: 0; } /* Ensure uniform text size */ #product-options .btn .label-text { font-weight: bold; /* Bold text */ display: inline-block; width: 100%; text-align: center; } Additinal js to assign the selected button to the radio buttons and sort the buttons alphabetically (as they appear in the order they are created in BO, unlike with dropdown where it sorts them): document.addEventListener('DOMContentLoaded', function() { const productOptionsContainer = document.querySelector('#product-options'); if (productOptionsContainer) { const buttons = productOptionsContainer.querySelectorAll('.btn'); buttons.forEach(function(button) { button.addEventListener('click', function() { buttons.forEach(function(btn) { btn.classList.remove('active'); }); button.classList.add('active'); const radioInput = button.querySelector('input[type="radio"]'); if (radioInput) { radioInput.checked = true; // Manually trigger the combination update in Thirty Bees if (typeof findCombination === "function") { findCombination(); } } }); }); } }); document.addEventListener('DOMContentLoaded', function() { const productOptionsContainer = document.querySelector('#product-options'); if (productOptionsContainer) { const buttons = Array.from(productOptionsContainer.querySelectorAll('.btn')); // Get all buttons // Extract the text values and sort them numerically or alphabetically buttons.sort((a, b) => { let valueA = a.textContent.trim(); let valueB = b.textContent.trim(); // Convert to numbers if possible, else compare as strings if (!isNaN(valueA) && !isNaN(valueB)) { return parseFloat(valueA) - parseFloat(valueB); } else { return valueA.localeCompare(valueB); } }); // Clear the container and re-append sorted buttons productOptionsContainer.innerHTML = ''; buttons.forEach(button => productOptionsContainer.appendChild(button)); } }); The issue is that this change does not work with Warehouse theme, I'm unable to make the button change the active combination, also the sorting does not work. My questions are: 1. Which functions were changed for detecting the combinations in this section? Currently Warehouse's implementation only adds to the cart the default combination so the js I have here does not work. 2. Can we move the sorting in the core for radio buttons? Currently it's done with a js during the output. 3. Is somebody else interested in such development and migration of the community themes? Are there people that use radio buttons in their pages in 2024? If we implement something similar for FO, the BO should still refer to them as 'radio buttons' as this is interwoven in many many parts of the system. 4. Can this be pulled into a module that replaces this part of the theme so this module could be theme-agnostic? Something similar to https://addons.prestashop.com/it/combinazioni-personalizzazione/49820-product-combination-images-swatch-attributes.html but for the buttons. 5. Shopify has a nice functionality - Swatch King - if we can implement something similar it will be nice - https://apps.shopify.com/variant-swatch-king The PS module and this also implement color swatches for combinations. The color swatches per combination is also a nice feature to have.
  15. The first module looks very promising. I see it is a Romanian developer. Do you know his/her name or company?
  16. @30knees did you purchase some of the modules at the end? I'm looking for a module that have vouchers with discount and commission spread. I only find 2 such modules - one which costs around 300 Euro for multishop support and one from FME, a developer that even don't publish their company on their site, not to speak about few issues with their modules.
  17. The community is small. We can not expect the same level of exposure to our issues as if it was the PS forum. By any chance somebody at your hosting 'took the liberty' to modify your files without telling you after this spam attack? In general those forms are used to attack 3rd parties - the bot inputs a 3rd party email as contact email and this is how they exploit your server spamming their email list. This of course plays badly with the email reputation of your host so they could take the liberty of simply disabling you form by commenting few lines. To check - can you try and update against version 1.1 and see if any files are changed? When checking check this on too in order to compare the template files also: Don't actually update just check if there are changed files, and if so copy the list here.
  18. I can imagine those changes are for one or two functions? If so - you can use some differencing tool to check your changes (if you've lost track of them) and then implement them in an override. ChatGPT will help you with that - it will create the override for you. Just don't forget about the overrides when something don't work as expected in future and first check without them! 🙂
  19. Yes, prior to installing recaptcha I had some attempts, changed the admin folder and since then I have not noticed any more attempts. But yes, if it's complicated don't bother, there is a working solution so.. 🙂 I like your development ideas!
  20. Admin page login support! 😛 Now I have captcha for BO and your module for FO. I would like to eliminate one of them and I bet you know it's not your module... ahah 🙂
  21. Wow... 1.1 is ages old, like dynosaurs old. You SHOULD work with somebody and update your site if you can't do it by yourself. MANY (and I really mean MANY) bugs were fixed since then and also MANY security flaws were ironed out. It's a miracle that you have not been hacked. Please, check the following: Customers -> Contacts - there you should have at least one row in the table with your email set up. Otherwise the customers will not have an option in the dropdown. You have two contact options there so you will see two rows - both emails should be correct. I've just contacted you via the contact form. Did you receive it?
  22. There is no thirty bees version 1.6.7. The NEXT major version will be 1.6 and the most current stable version is 1.5.1. If you are on 1.4 email works in certain way. If you are on 1.5 few things changed so you need to check that and give correct info so we can help. The module can be downloaded from here https://github.com/eschiendorfer/genzo_turnstile/releases/tag/v.1.0.0 - the first file, instal as usual and you have to make free registration and setup with Cloudflare for their turnstile service.
×
×
  • Create New...