Jump to content

Nickovitshj

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by Nickovitshj

  1. test reply, i have a solution but can't post it; i get a message that i've been blocked by prestashop
  2. I did find another solution that works for me. I'm using the combined .pdf file. Next i'm using PDFsam (open source/free) With that tool I can split the invoices and give them the corresponding number.
  3. Correct, but all those invoices are then stored in one pdf file. It would be way more usefull if it would generate all of them as seperate files with the invoice prefix and number
  4. Hi all, Managed to get in touch with a good mate who have good SQL knowledge. Basically we rewrote everything from start to figure out the exact issue. Seems like we needed a subQuery to achieve our result and avoid duplicate records. Please keep in mind that this is a query written for a multistore setup. Though, you can probably repurpose it for single store. Final SQL: SELECT customer_name as 'xxx Customer' , FORMAT(SUM(ROUND((o.total_products+o.total_shipping_tax_excl),2)),2,'de_DE') as 'Total Order', FORMAT(SUM(ROUND(o.total_discounts/1.21,2)),2,'de_DE') as 'Total Voucher', FORMAT(SUM(productPrice),2,'de-DE') as 'HW S&S Only | ', FORMAT(SUM((productPrice)*0.99),2,'de-DE') as 'HW S&S Only (-1%) | ', FORMAT(SUM(ROUND(o.total_discounts/1.21,2) - IF(productPrice+total_shipping_tax_excl>total_discounts_tax_incl/1.21, ROUND(total_discounts_tax_incl/1.21,2), ROUND(productPrice+total_shipping_tax_excl,2))),2,'de_DE') as "Company | xxx CRM", FORMAT(SUM(ROUND(o.total_paid/1.21,2)),2,'de_DE') as 'xxx Payment' FROM ps_orders o INNER JOIN (SELECT id_order, MAX(product_price) as productPrice FROM ps_order_detail GROUP BY id_order) detail ON o.id_order=detail.id_order INNER JOIN ps_shop shop ON o.id_shop=shop.id_shop INNER JOIN storedb.ps_order_history history ON o.id_order=history.id_order WHERE o.id_shop_group = 12 AND id_order_state = 4 AND history.date_add BETWEEN '2022-09-18' AND '2022-10-20' group by customer_name HAVING SUM(FORMAT(ROUND((total_products+total_shipping_tax_excl),2),2,'de_DE')) > 1 ;
  5. Hi all, With the following SQL i'm getting the current result. However, my 3 commented select statements I can't get to work. I keep getting an error message as soon as I try to join the ps_order_detail table due to an aggregate function error. I keep googling but haven't found a working solution in hours. If anyone experienced in SQL could help me i'd be so gratefull. If you require more information please just ask. I think mainly the issue is adding the ps_order_detail table is causing duplicate rows. SELECT shop.customer_name as 'Customer Name', FORMAT(SUM(ROUND((orders.total_products+orders.total_shipping_tax_excl),2)),2,'de_DE') as 'Total Order', FORMAT(SUM(ROUND(orders.total_discounts/1.21,2)),2,'de_DE') as 'Total Voucher', -- FORMAT(SUM(IF((MAX(detail.product_price)+total_shipping_tax_excl)>total_discounts_tax_incl/1.21, ROUND(total_discounts_tax_incl/1.21,2), ROUND(MAX(detail.product_price)+total_shipping_tax_excl,2))),2,'de_DE') as 'HW S&S Only |', -- FORMAT(IF((MAX(product_price)+total_shipping_tax_excl)>total_discounts_tax_incl/1.21, ROUND((total_discounts_tax_incl/1.21)*0.99,2), ROUND((MAX(product_price)+total_shipping_tax_excl)*0.99,2)),2,'de_DE') as 'HW S&S Only (-1%) |' , -- FORMAT(ROUND(total_discounts/1.21,2) - IF((MAX(product_price)+total_shipping_tax_excl)>total_discounts_tax_incl/1.21, ROUND(total_discounts_tax_incl/1.21,2), ROUND(MAX(product_price)+total_shipping_tax_excl,2)),2,'de_DE') as "test", FORMAT(SUM(ROUND(orders.total_paid/1.21,2)),2,'de_DE') as 'xxx Payment' FROM storedb.ps_order_history history INNER JOIN storedb.ps_orders orders ON history.id_order=orders.id_order INNER JOIN storedb.ps_shop shop ON orders.id_shop=shop.id_shop -- INNER JOIN storedb.ps_order_detail detail -- ON orders.id_order=detail.id_order /* WHERE EXISTS (SELECT DISTINCT id_order FROM ps_order_detail HAVING FORMAT(SUM(IF((MAX(detail.product_price)+total_shipping_tax_excl)>total_discounts_tax_incl/1.21, ROUND(total_discounts_tax_incl/1.21,2), ROUND(MAX(detail.product_price)+total_shipping_tax_excl,2))),2,'de_DE') ) */ AND id_order_state = 4 AND orders.id_shop_group = 12 -- AND orders.id_shop = 41 AND history.date_add BETWEEN '2022-09-18' AND '2022-10-20' -- AND orders.id_order = 2156 GROUP BY customer_name HAVING SUM(FORMAT(ROUND((total_products+total_shipping_tax_excl),2),2,'de_DE')) > 1 ;
  6. If anyone has a solution for this, please share.
  7. Attached you can find my solution, which I used for updating the stock quantities for my combinations using jQuery. You can adjust the logic and styling to show different styling based on the amount via conditional logic. Reason I did it through Jquery is because I wanted it to be automatically updated whenever a new combination was selected. (Listening to browser event) Most likely with simpler solutions like above you'll have a working solution. When we looking for a solution similar to mine JavaScript is needed I think HOW TO update stock quantity based on combination.docx
  8. Can you try: {$product_attribute.ean13} ? Otherwise retry: $product->ean13
  9. Can you check the code/html and database on that? See how it's configured there?
  10. Hi Everyone, Microsoft will soon stop using the regular username/password authentication method for their SMTP configurations. However, this is the only option possible within PrestaShop by default. We would now require OAuth or Graph API authentication. For WordPress such plugins exist. However, it seems for PS it doesn't at all (I've searched for hours). Is anyone here experienced enough to develop such a module. I'm sure this would get sold a lot on the addons store. Or if anyone knows of a code edit that can easily achieve the result i'm looking for. Basically the new authentication would need the following to be configured: Client ID Tenant ID Client Secret Redirect URI Kr, Nick
  11. Nevermind, I got it working. I read the instructions wrong; Thanks @shapwill
  12. I just noticed that I get an 500 server error when trying to test this file from shapwill
  13. How can we change the email template for this easily? Change it, as in duplicate the bankwire.html one and use a clone of that.
  14. You'll need javascript to achieve this. Can you link your page where it's happening?
  15. As JBW described above. In that file you need to change the following css rule: .cbp-horizontal > ul > li > a, .cbp-horizontal > ul > li > span.cbp-main-link { color: #4CAF50; line-height: 45px; padding-left: 10px; max-width: 400px; padding-right: 10px; text-transform: uppercase; font-size: 15px; border-left: 1px none #cecece; } To change the orange box message at the top I think this needs changing in header.tpl
  16. Enable debugging and proceed until you get the error, then provide the error here.
  17. Go to advanced paramaters -> e-mail. Do you see any related email in the log there?
  18. Is the premium watch shop folder empty other than the mails and modules folders? There should be a /templates folder within these theme folders.
  19. You now have to go to the public_html folder. In there, there'll be a /themes folder. Inside that folder you must then select to theme used on your shop. Once you're there there'll be a .tpl file that needs editing. Most likely once named header.tpl
  20. If you have no experience with editing code like this I'd also suggest learning the basics of HTML/CSS. With some basic understanding you can achieve a lot and are less likely to mess stuff up. https://www.w3schools.com/html/
×
×
  • Create New...