Jump to content
thirty bees forum

Pedalman

Members
  • Posts

    422
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Pedalman

  1. I just wanted to know, if it is still being supported, before I have a look into it. Most likely, I will need support due to Databack's comment on payment options integration in the checkout. I am using since two years Chex and if I got it right I might run into issues.

  2. Well, I am pretty certain that there are lots of old db entries from modules etc we dont use for a long time. But I am just a merchant and think that I should therefore install a fresh installation and migrate shop data (only) to get rid of old entries.

  3. No, no, we just began 10 years ago with PS1.x, and I was one of the first who migrated to TB. I am running now TB1.4 stable, but am tempted to make a clean vanilla installation of TB bleeding edge and a new theme (problably the often mentioned Cisero theme). I then need to migrate my shop data to the new installation (maybe with some 3rd party module I like to continue to use).

    I know about the great  Prestools_Suite but must admit though I am a supporter, I never got really warm with the module.

  4. Nichtsdestotrotz, ist der Shopbetreiber, der kein Design-Programierkünsterl ist, vielleicht ein wenig mit den vorhanden Möglichkeiten überfordert. Eine vielleicht erstmal rudimentäre aber nutzbare Möglichkeit, seine Startseite, schnell zu ändern wäre schon schön.

  5. I am very interested to get away from our GDPR cookie solution that is depending on an external service. I have no clue but could it be that both of the above scripts could improve web page loading times if they are hosted locally?

    Do you run on of the above?

    Do we as merchants need to track the made options of customers in any way (TB db table)?

  6. Thank you, I got that working.

    Just out of curiosity, I tried to copy the addtions to an override. Never did that before, so I like to ask, if the following is fine, or if it even could be made more concise.

    <?php
    
    class HTMLTemplateInvoiceCore extends HTMLTemplateCore
    {	
    
    
    
        public function getContent()
        {
            $invoiceAddressPatternRules = json_decode(Configuration::get('PS_INVCE_INVOICE_ADDR_RULES'), true);
            $deliveryAddressPatternRules = json_decode(Configuration::get('PS_INVCE_DELIVERY_ADDR_RULES'), true);
    
            $invoiceAddress = new Address((int) $this->order->id_address_invoice);
            $country = new Country((int) $invoiceAddress->id_country);
            $formattedInvoiceAddress = AddressFormat::generateAddress($invoiceAddress, $invoiceAddressPatternRules, '<br />', ' ');
    
            $deliveryAddress = null;
            $formattedDeliveryAddress = '';
            if (isset($this->order->id_address_delivery) && $this->order->id_address_delivery) {
                $deliveryAddress = new Address((int) $this->order->id_address_delivery);
                $formattedDeliveryAddress = AddressFormat::generateAddress($deliveryAddress, $deliveryAddressPatternRules, '<br />', ' ');
            }
    
            $customer = new Customer((int) $this->order->id_customer);
            $carrier = new Carrier((int) $this->order->id_carrier);
    
            $orderDetails = $this->order_invoice->getProducts();
            $order = new Order($this->order_invoice->id_order);
    
            $hasDiscount = false;
            foreach ($orderDetails as $id => &$orderDetail) {
                // Find out if column 'price before discount' is required
                if ($orderDetail['reduction_amount_tax_excl'] > 0) {
                    $hasDiscount = true;
                    $orderDetail['unit_price_tax_excl_before_specific_price'] = $orderDetail['unit_price_tax_excl_including_ecotax'] + $orderDetail['reduction_amount_tax_excl'];
                } elseif ($orderDetail['reduction_percent'] > 0) {
                    $hasDiscount = true;
                    $orderDetail['unit_price_tax_excl_before_specific_price'] = (100 * $orderDetail['unit_price_tax_excl_including_ecotax']) / (100 - $orderDetail['reduction_percent']);
                }
    
                // Set tax_code
                $taxes = OrderDetail::getTaxListStatic($id);
                $taxTemp = [];
                foreach ($taxes as $tax) {
                    $obj = new Tax($tax['id_tax']);
                    $taxTemp[] = sprintf($this->l('%1$s%2$s%%'), (float) round($obj->rate, 3), '&nbsp;');
                }
    
                $orderDetail['order_detail_tax'] = $taxes;
                $orderDetail['order_detail_tax_label'] = implode(', ', $taxTemp);
            }
            unset($taxTemp);
            unset($orderDetail);
    
            if (Configuration::get('PS_PDF_IMG_INVOICE')) {
                foreach ($orderDetails as &$orderDetail) {
                    if ($orderDetail['image'] instanceof Image) {
                        $imageId = (int)$orderDetail['image']->id;
                        $orderDetail['image_tag'] = preg_replace(
                            '/\.*'.preg_quote(__PS_BASE_URI__, '/').'/',
                            _PS_ROOT_DIR_.DIRECTORY_SEPARATOR,
                            ImageManager::getProductImageThumbnailTag($imageId, false),
                            1
                        );
    
                        $imagePath = ImageManager::getProductImageThumbnailFilePath($imageId);
                        if (file_exists($imagePath)) {
                            $orderDetail['image_size'] = getimagesize($imagePath);
                        } else {
                            $orderDetail['image_size'] = false;
                        }
                    }
                }
                unset($orderDetail); // don't overwrite the last order_detail later
            }
    
            $cartRules = $this->order->getCartRules();
            $freeShipping = false;
            foreach ($cartRules as $key => $cartRule) {
                if ($cartRule['free_shipping']) {
                    $freeShipping = true;
                    /**
                     * Adjust cart rule value to remove the amount of the shipping.
                     * We're not interested in displaying the shipping discount as it is already shown as "Free Shipping".
                     */
                    $cartRules[$key]['value_tax_excl'] -= $this->order_invoice->total_shipping_tax_excl;
                    $cartRules[$key]['value'] -= $this->order_invoice->total_shipping_tax_incl;
    
                    /**
                     * Don't display cart rules that are only about free shipping and don't create
                     * a discount on products.
                     */
                    if ($cartRules[$key]['value'] == 0) {
                        unset($cartRules[$key]);
                    }
                }
            }
    
            $productTaxes = 0;
            foreach ($this->order_invoice->getProductTaxesBreakdown($this->order) as $details) {
                $productTaxes += $details['total_amount'];
            }
    
            $productDiscountsTaxExcl = $this->order_invoice->total_discount_tax_excl;
            $productDiscountsTaxIncl = $this->order_invoice->total_discount_tax_incl;
            if ($freeShipping) {
                $productDiscountsTaxExcl -= $this->order_invoice->total_shipping_tax_excl;
                $productDiscountsTaxIncl -= $this->order_invoice->total_shipping_tax_incl;
            }
    
            $productsAfterDiscountsTaxExcl = $this->order_invoice->total_products - $productDiscountsTaxExcl;
            $productsAfterDiscountsTaxIncl = $this->order_invoice->total_products_wt - $productDiscountsTaxIncl;
    
            $shippingTaxExcl = $freeShipping ? 0 : $this->order_invoice->total_shipping_tax_excl;
            $shippingTaxIncl = $freeShipping ? 0 : $this->order_invoice->total_shipping_tax_incl;
            $shippingTaxes = $shippingTaxIncl - $shippingTaxExcl;
    
            $wrappingTaxes = $this->order_invoice->total_wrapping_tax_incl - $this->order_invoice->total_wrapping_tax_excl;
    
            $totalTaxes = $this->order_invoice->total_paid_tax_incl - $this->order_invoice->total_paid_tax_excl;
    
            $footer = [
                'products_before_discounts_tax_excl' => $this->order_invoice->total_products,
                'product_discounts_tax_excl'         => $productDiscountsTaxExcl,
                'products_after_discounts_tax_excl'  => $productsAfterDiscountsTaxExcl,
                'products_before_discounts_tax_incl' => $this->order_invoice->total_products_wt,
                'product_discounts_tax_incl'         => $productDiscountsTaxIncl,
                'products_after_discounts_tax_incl'  => $productsAfterDiscountsTaxIncl,
                'product_taxes'                      => $productTaxes,
                'shipping_tax_excl'                  => $shippingTaxExcl,
                'shipping_taxes'                     => $shippingTaxes,
                'shipping_tax_incl'                  => $shippingTaxIncl,
                'wrapping_tax_excl'                  => $this->order_invoice->total_wrapping_tax_excl,
                'wrapping_taxes'                     => $wrappingTaxes,
                'wrapping_tax_incl'                  => $this->order_invoice->total_wrapping_tax_incl,
                'ecotax_taxes'                       => $totalTaxes - $productTaxes - $wrappingTaxes - $shippingTaxes,
                'total_taxes'                        => $totalTaxes,
                'total_paid_tax_excl'                => $this->order_invoice->total_paid_tax_excl,
                'total_paid_tax_incl'                => $this->order_invoice->total_paid_tax_incl,
            ];
    
            $decimals = 0;
            if ((new Currency($this->order->id_currency))->decimals) {
                $decimals = Configuration::get('PS_PRICE_DISPLAY_PRECISION');
            }
            foreach ($footer as $key => $value) {
                $footer[$key] = Tools::ps_round(
                    $value,
                    $decimals,
                    $this->order->round_mode
                );
            }
    
            $displayProductImages = Configuration::get('PS_PDF_IMG_INVOICE');
            $taxExcludedDisplay = Group::getPriceDisplayMethod($customer->id_default_group);
    
            $layout = $this->computeLayout(['has_discount' => $hasDiscount]);
    
            $legalFreeText = Hook::exec('displayInvoiceLegalFreeText', ['order' => $this->order]);
            if (!$legalFreeText) {
                $legalFreeText = Configuration::get('PS_INVOICE_LEGAL_FREE_TEXT', (int) Context::getContext()->language->id, null, (int) $this->order->id_shop);
            }
    
            $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,
                'other'     => $invoiceAddress->other, 
                'other2'    => $deliveryAddress->other 
            ];
            $this->smarty->assign($data);
    
            $tpls = [
                'style_tab'     => $this->smarty->fetch($this->getTemplate('invoice.style-tab')),
                'addresses_tab' => $this->smarty->fetch($this->getTemplate('invoice.addresses-tab')),
                'summary_tab'   => $this->smarty->fetch($this->getTemplate('invoice.summary-tab')),
                'product_tab'   => $this->smarty->fetch($this->getTemplate('invoice.product-tab')),
                'tax_tab'       => $this->getTaxTabContent(),
                'payment_tab'   => $this->smarty->fetch($this->getTemplate('invoice.payment-tab')),
                'note_tab'      => $this->smarty->fetch($this->getTemplate('invoice.note-tab')),
                'total_tab'     => $this->smarty->fetch($this->getTemplate('invoice.total-tab')),
                'shipping_tab'  => $this->smarty->fetch($this->getTemplate('invoice.shipping-tab')),
            ];
            $this->smarty->assign($tpls);
    
            return $this->smarty->fetch($this->getTemplateByCountry($country->iso_code));
        }
    }

     

  7. How did it go?

    I am looking for a Google Reviews integration, too. At the moment I have it integrated via an old version for an GTM module from Prestashop.

    Issue is that the module presents customers the badge in English and our shop is hosted in Germany. I have no clue how to set the review module to a specific language, e.g. German.

  8. I need to add information that is saved during adress sign up in the field 'other' on invoice.

     

    I added into to invoice.summary.pdf

    	{if $addresses.invoice->other}
    		<tr>
    			<td class="payment left small grey bold" width="44%">{l s='Invoice Number' pdf='true'}</td>
    			<td class="payment left white" width="56%">
    				<table width="100%" border="0">				
    						<tr>
    							<td class="right small">{$addresses.invoice->other}</td>
    						</tr>				
    				</table>
    			</td>
    		</tr>	
    	{/if}

    and added also the field other to HTMLTemplateInvoice.php

     $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,
                'other'            => $other,
            ];
            $this->smarty->assign($data);

     

    Well, since I had almost no idea what I am doing and tried at least. But to no success.

    So, how can I achive that information a customer adds during sign up into the field 'other' is displayed on the invoice?

  9. Ok, weekend has started for me and my children are making noise as usual, but I doubt I would understand here which field is the right one even if it were Monday morning 🙂 I tried context:company but to no avail.

    Assuming that I can assign a condition (updated field in my case) and the cron is running each sec, which might be a no-go to do, I wonder if I can reach my goal. All I want is that only customers who fill out the field company are assigned to a  customer group that is allowed to make use of a certain payment option. All others customers shall not see this payment option. Since I choose also Chex I wonder if such a 'real-time' change in payment options is possible.

     

    PS:

    I wish you a nice and refreshing weekend, too.

  10. Ehm, well I am pretty sure that it is not working. I tried it once...

    Question was, how I can accomplish that a customer is assigned a certain customer group when he/she fills out or updates the company field during checkout, address registration.

     

  11. Hello

    I like to make use of the great Conseq Module from Datakick.

    :

    At registration or address update, each time a customer fills out or updates the 'company' field the customer shall be assigned an additional 'group', e.g. 'vips'.

    Screenshot 2022-11-25 at 16-48-48 Consequences Anzeigen • Grünes Spielzeug.png

    Screenshot 2022-11-25 at 16-48-38 Consequences Anzeigen • Grünes Spielzeug.png

    Screenshot 2022-11-25 1.png

  12. Hello

    I want to use some custom emails and email states. The problem is I want that the AdvEUComp. module adds the legal text fields I choose in the module but my custom emails do not show up in the module.

    Waht can I do?

    Is this configured in the module or in the db? I can hardly remember that Presta did seperate between email templates that come with the installation and ones you create (custom).

  13. Hallo

    wir bieten unseren Kunden PayPal und Kauf auf Rechnung von Klarna via dem Payment Service Provider Mollie an.

    Bisher läuft PayPal auch über Mollie. Jedoch um Nebenkosten zu sparen würde ich gern das von Datakick gepflegte Thirtybee's PayPal Modul direkt nutzen.

    Nun frage ich mich, ob ich noch weiterhin bei Mollie bleiben soll (PS 1.6x unterstützen sie eh nicht mehr)... Ich brauche also eine Möglichkeit, meinen Kunden den Rechnungskauf anzubieten.

    Hier gibt es ja auch PayPal Plus mit RK.... aber ist es besser als Klarna?

    Wie habt Ihr Klarna eingebunden bzw. welchen Dienst nutzt Ihr?

    Was haltet ihr vom RK via PayPal?

     

    PS:

    Ich vermute mal, dass die Dienst schon in Europa sitzen sollten und es einfach ist, die Unterlagen für die Buchhaltung (Transaktionslisten etc.) zu erhalten.

    • Like 1
  14. Ok,

    I need a list of the glitches and fixes for Warehouse.

    I am in doubt that we will see another theme as an option with fewer glitches for months. Despite this assumption, I am willing to pay even 250Euro for a theme that fulfills our wills and is maintained here.

     

×
×
  • Create New...