Jump to content
thirty bees forum

Pedalman

Silver member
  • Posts

    435
  • Joined

  • Last visited

  • Days Won

    5

Pedalman last won the day on April 19

Pedalman had the most liked content!

About Pedalman

Recent Profile Visitors

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

Pedalman's Achievements

Enthusiast

Enthusiast (6/14)

  • Dedicated Rare
  • First Post
  • Collaborator Rare
  • Conversation Starter
  • Reacting Well Rare

Recent Badges

66

Reputation

  1. I added into HTMLTemplateInvoice.php /classes/pdf/ $data = [ 'order' => $this->order, 'order_invoice' => $this->order_invoice, 'order_details' => $orderDetails, 'carrier' => $carrier, 'cart_rules' => $cartRules, 'delivery_address' => $formattedDeliveryAddress, 'invoice_address' => $formattedInvoiceAddress, 'addresses' => ['invoice' => $invoiceAddress, 'delivery' => $deliveryAddress], 'tax_excluded_display' => $taxExcludedDisplay, 'display_product_images' => $displayProductImages, 'layout' => $layout, 'customer' => $customer, 'footer' => $footer, 'legal_free_text' => $legalFreeText, 'addnote_invoiceadr' => $invoiceAddress->other, 'addnote_deliveryadr' => $deliveryAddress->other ]; $this->smarty->assign($data); Then I added different infomartion into the field "other" in invoice and delivery adress of the customer. But problem is that the invoice shows only the data from the inoice fields. my template: {if $addresses.invoice->other} <tr> <td class="payment left small grey bold" width="44%">{l s='Zusatzangabe' pdf='true'}</td> <td class="payment left white" width="56%"> <table width="100%" border="0"> <tr> <td class="right small"> {$addnote_invoiceadr} </td> </tr> </table> </td> </tr> {/if} {if $addresses.delivery->other} <tr> <td class="payment left small grey bold" width="44%">{l s='Zusatzangabe' pdf='true'}</td> <td class="payment left white" width="56%"> <table width="100%" border="0"> <tr> <td class="right small">{$addnote_deliveryadr} </td> </tr> </table> </td> </tr> {/if} What am I missing?
  2. For Edge the code wasn't very convenient. Here is a working one that allows you to batch/bulk download invoices in backoffice/orders withouth Edge complaining. Just put it into Datakick's module at the appropriate place. $(function() { if (window['kpis']) { $.each(window['kpis'], function(id, kpi) { if (kpi.initRefresh) { refresh_kpi(id, kpi); } }); if (!$('a#downloadBulkSingle').length) { // Check if the link already exists $('body.adminorders .bulk-actions ul').append( '<li><a href="#" id="downloadBulkSingle"><i class="icon-download"></i>&nbsp;Bulk Rechnungsdownload</a></li>' ); $('body').on('click', 'a#downloadBulkSingle', function(e) { e.preventDefault(); var delay = 0; // Initial delay in milliseconds $('[name="orderBox[]"]:checked').each((i, e) => { var invoiceUrl = $(e).closest('tr').find('a[href*="generateInvoicePDF"]').attr('href'); // Set a delay before each download setTimeout(() => { fetch(invoiceUrl) .then(response => { // Extract filename from Content-Disposition header var filename = "Rechnung_" + (i + 1) + ".pdf"; var contentDisposition = response.headers.get("Content-Disposition"); if (contentDisposition && contentDisposition.includes("filename=")) { filename = contentDisposition .split("filename=")[1] .split(";")[0] // Take only the part before the semicolon .replace(/['"]/g, ""); // Remove any quotes } return response.blob().then(blob => ({ blob, filename })); }) .then(({ blob, filename }) => { var link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = filename; // Use the extracted filename link.click(); // Trigger the download }) .catch(error => console.error('Fehler beim Download der Rechnung:', error)); }, delay); delay += 500; // Increase the delay by 500ms for the next download }); }); } } });
  3. I am trying to revive this thread. An easy question first. How do you customize Niara's homepage? This is something we merchants should do regularly (season selling etc.) and it should be easy.
  4. I had in TB 1.4 an enhancement for me in the admin.js code that allowed me for selected orders in bo orders list to do a bulk action like downloading pdf. My problem is that I cannot get it working with tb 1.6x. Even with the help of AI it won't work 🙂 Line 875 admin.js if (window['kpis']) { $.each(window['kpis'], function(id, kpi) { if (kpi.initRefresh) { refresh_kpi(id, kpi); } }); } }); old V1.4 additional code if ($('.kpi-container').length) { refresh_kpis(); } $('body.adminorders .bulk-actions ul').append('<li><a href="#" id="downloadBulkSingle"><i class="icon-download"></i>&nbsp;Bulk Rechnungsdownload</a></li>'); $('a#downloadBulkSingle').click(function(e){ e.preventDefault(); $('[name="orderBox[]"]:checked').each((i,e)=> $(e).parents('tr').find('a[href*="generateInvoicePDF"]').each((a,c) => c.click())); }); }); ChatGPT thinks this would be proper.... In this version: The code checks if #downloadBulkSingle already exists to avoid duplication. It uses on for the click event, making it more flexible if the link is reloaded dynamically. if (window['kpis']) { $.each(window['kpis'], function(id, kpi) { if (kpi.initRefresh) { refresh_kpi(id, kpi); } }); if (!$('a#downloadBulkSingle').length) { // Check if the link already exists $('body.adminorders .bulk-actions ul').append( '<li><a href="#" id="downloadBulkSingle"><i class="icon-download"></i>&nbsp;Bulk Rechnungsdownload</a></li>' ); $('body').on('click', 'a#downloadBulkSingle', function(e) { e.preventDefault(); $('[name="orderBox[]"]:checked').each((i, e) => { $(e).closest('tr').find('a[href*="generateInvoicePDF"]').each((a, c) => c.click()); }); }); } } Would be nice if someone could make this work with 1.6 again. thx
  5. Works ! I had to choose in PHPMail protocoll TLS and port 587. Rest I did not touch. Eventually, I made sure that in email settings of the backoffice PHPmail was set as transport module. And for my satisfaction there I also found a test mail system 'button'. Great work and thank you all! Hallo! Dies ist eine Testmail von Ihrem Shop. Wenn Sie sie lesen können, war der Test erfolgreich.
  6. Oh, I found the place where to activate a transport system! It is indeed under bo/../email but I had a huge list of email logs from the past and did not realise that these settings are at the very bottom! I will test again now.
  7. Swiftmailer is still deinstalled. I tried to misconfigure it via wrong password and no 'error message' is thrown. I just accepts it. If I go then again to orders and resend an older message status/order status it tells me, that mail was successfully send! Anyhow, goint to the tab /bo/email I get the information that I do not have a mail transport set up! Sorry, but I do not know what is meant with that at the moment (btw. I test mail system of the host with webmail and it can send and receive). Your server is NOT sending emails. Please install some email transport module and select it for use
  8. So, what can I do to get my issue solved? As said, the 'module' or TB says that it send mails if I for example set an order state that is to send mail to customer. I see no error log but mails to not appear in mailbox.
  9. I dont know what is better about PHPmailer. I thought that swiftmailer was going to be deprecated. Misunderstanding I think. I am on a dedicated server.
  10. Well, despite having read through all information I could find in this forum and Hetzner's doc system Setting up an email account - Hetzner Docs I still get not phpmail module sending mails. I cloned my live shop (V1.4 php 7.4) to a new domain and upgraded to V1.5 (php 7.4). Then I made sure that all modules are up to date, swiftmail is deinstalled and phpmail installed. Then I set phpmail up with the credentials of the new domain ([email protected]) I resend mails from test orders but no emails were received. Thirtybees tells me that it set successfully the mail! I then decided to use the credentials of my live shop ([email protected]) since I thought may be there is some issue with a cert or so. I also checked that in bo/shop the same mail was used. The problem is the same. Mail purpotedly send but my email client does not receive any. So, what can I do? I linked the information of Hetzner above if that helps. Thank you
  11. I read through all about tbphpmailer in this forum, in the Herzner community and asked the KI 🙂 I am pretty sure I used the right credentials and settings in tbphpmail but I get the following error. It is happening on tb1.6 php8.3 Send Email Error: Failed opening required '/usr/www/users/123/dev1/modules/tbphpmailer/vendor/autoload.php' (include_path='/usr/www/users/123/dev1/vendor/pear/archive_tar:/usr/www/users/123/dev1/vendor/pear/console_getopt:/usr/www/users/123/dev1/vendor/pear/pear-core-minimal/src:/usr/www/users/123/dev1/vendor/pear/pear_exception:.:/usr/local/lib/php/')
  12. It must have been a caching issue. At least today all is fine and it is showing matching information. Thirty bees version: 1.6.0 Thirty bees revision: Build for PHP version: 8.3 Serverdaten Serverdaten Linux #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 Version der Server-Software Apache PHP-Version 8.3.12 Speichergrenze 256M max_execution_time 180
  13. I upgraded TB to the latest version, stable then bleeding edge, and am runnning php 8.3 on the server, too. Nevertheless, in TB configuration the information Build for PHP version: 7.4 is still shown. So, is this as intended? I used while upgrading in core updater the option to choose custom target. This I set to the proper php version.
  14. 1.5.1 indeed displayed a compatibility hint. It was about allow_url_fopen . I then could install it as usual. This applies now to the older version thirtybees-v1.4.0-php7.4.zip, too. So, I had to activate allow_url_fopen on the server. Thank you for the tip!
  15. I a bit ashamed to ask, but I have problems to install TB. I try it on a sub domain, with ssl. My hoster is Hetzner. I did this is the past dozen times but this time I do not know what I doing wrong. I create the subdir that is accessible via sub domain on the host. Then I extract the tb install .zip and start /install/index.php. Step 1 and 2 appear as usual but then I get the annoying error: Link to database cannot be established: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known I used thirtybees-v1.4.0-php7.4.zip and the host's server version of php matches 7.4.
×
×
  • Create New...