Jump to content

Edit History

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php (Not tested!!!)

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.fa5ddd8db54ba64f9b71611f7353adc9.png

 

                $productAvailableQuantity = StockAvailable::getQuantityAvailableByProduct(
                    (int) $product['id_product'],
                    (int) $product['id_product_attribute'],
                    (int) $order->id_shop
                );

                $productInfo = new Product((int) $product['id_product'], false, $order->id_lang);
                $productAvailableNow = $productInfo->available_now;
                $productAvailableLater = $productInfo->available_later;
                $returnAvailabilityText = '';

                if ($productAvailableQuantity > 0) {
                    if ($productAvailableNow) {
                        $returnAvailabilityText = $productAvailableNow;
                    } else {
                        $returnAvailabilityText = $this->trans('Available now', [], 'Emails.Subject', $order->id_lang);
                    } 
                } else {
                    $availableDate = Product::getAvailableDate((int) $product['id_product'], $product['id_product_attribute']);
                    if ($productAvailableLater) {
                        if ($availableDate) {
                            $returnAvailabilityText = $productAvailableLater. '('.Tools::displayDate($availableDate, null, false).')';
                        } else {
                            $returnAvailabilityText = $productAvailableLater;
                        }
                    } else {
                        if ($availableDate) {
                            $returnAvailabilityText = $this->trans('Available later', [], 'Emails.Subject', $order->id_lang). '('.Tools::displayDate($availableDate, null, false).')';
                        } else {
                            $returnAvailabilityText = $this->trans('Available later', [], 'Emails.Subject', $order->id_lang);
                        }
                    }    
                }

                $product_var_tpl = [
                    'id_product' => $product['id_product'],
                    'id_product_attribute' => $product['id_product_attribute'],
                    'reference' => $product['reference'],
                    'name' => $product['name'] . (isset($product['attributes']) ? ' - ' . $product['attributes'] : ''),
                    'price' => Tools::getContextLocale($this->context)->formatPrice($product_price * $product['quantity'], $this->context->currency->iso_code),
                    'quantity' => $product['quantity'],
                    'availability' => $returnAvailabilityText,
                    'customization' => [],
                ];

 

and in the TPL email template (order_conf_product_list.tpl):

obrazek.png.3754fb110d7df182e27924d8c84a807a.png

 

updated (added in green box):

obrazek.png.08e5f645b799a0074413d7c6b1ad0834.png

	<td style="border:1px solid #D6D4D4;">
		<table class="table">
			<tr>
				<td width="5">&nbsp;</td>
				<td align="right">
					<font size="2" face="Open-sans, sans-serif" color="#555454">
						{$product['quantity']}
						{if isset($product['availability']) && $product['availability']}
						<br>{$product['availability'] nofilter}
						{/if}
					</font>
				</td>
				<td width="5">&nbsp;</td>
			</tr>
		</table>
	</td>

You can do the same with the ps_emailalerts module 😉

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php (Not tested!!!)

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.fa5ddd8db54ba64f9b71611f7353adc9.png

 

                $productAvailableQuantity = StockAvailable::getQuantityAvailableByProduct(
                    (int) $product['id_product'],
                    (int) $product['id_product_attribute'],
                    (int) $order->id_shop
                );

                $productInfo = new Product((int) $product['id_product'], false, $order->id_lang);
                $productAvailableNow = $productInfo->available_now;
                $productAvailableLater = $productInfo->available_later;
                $returnAvailabilityText = '';

                if ($productAvailableQuantity > 0) {
                    if ($productAvailableNow) {
                        $returnAvailabilityText = $productAvailableNow;
                    } else {
                        $returnAvailabilityText = $this->trans('Available now', [], 'Emails.Subject', $order->id_lang);
                    } 
                } else {
                    $availableDate = Product::getAvailableDate((int) $product['id_product'], $product['id_product_attribute']);
                    if ($productAvailableLater) {
                        if ($availableDate) {
                            $returnAvailabilityText = $productAvailableLater. '('.Tools::displayDate($availableDate, null, false).')';
                        } else {
                            $returnAvailabilityText = $productAvailableLater;
                        }
                    } else {
                        if ($availableDate) {
                            $returnAvailabilityText = $this->trans('Available later', [], 'Emails.Subject', $order->id_lang). '('.Tools::displayDate($availableDate, null, false).')';
                        } else {
                            $returnAvailabilityText = $this->trans('Available later', [], 'Emails.Subject', $order->id_lang);
                        }
                    }    
                }

                $product_var_tpl = [
                    'id_product' => $product['id_product'],
                    'id_product_attribute' => $product['id_product_attribute'],
                    'reference' => $product['reference'],
                    'name' => $product['name'] . (isset($product['attributes']) ? ' - ' . $product['attributes'] : ''),
                    'price' => Tools::getContextLocale($this->context)->formatPrice($product_price * $product['quantity'], $this->context->currency->iso_code),
                    'quantity' => $product['quantity'],
                    'availability' => $returnAvailabilityText,
                    'customization' => [],
                ];

 

and in the TPL email template (order_conf_product_list.tpl):

obrazek.png.3754fb110d7df182e27924d8c84a807a.png

 

updated (added in green box):

obrazek.png.08e5f645b799a0074413d7c6b1ad0834.png

	<td style="border:1px solid #D6D4D4;">
		<table class="table">
			<tr>
				<td width="5">&nbsp;</td>
				<td align="right">
					<font size="2" face="Open-sans, sans-serif" color="#555454">
						{$product['quantity']}
						{if isset($product['availability']) && $product['availability']}
						<td>{$product['availability'] nofilter}
						{/if}
					</font>
				</td>
				<td width="5">&nbsp;</td>
			</tr>
		</table>
	</td>

You can do the same with the ps_emailalerts module 😉

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php (Not tested!!!)

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.347868a92df027a9f0adaff3b334bdb6.png

 

 

and in the TPL email template (order_conf_product_list.tpl):

obrazek.png.3754fb110d7df182e27924d8c84a807a.png

 

updated (added in green box):

obrazek.png.08e5f645b799a0074413d7c6b1ad0834.png

 

You can do the same with the ps_emailalerts module 😉

obrazek.png

obrazek.png

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php (Not tested!!!)

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.ab5d11303036f559ede33cf9a450d6f8.png

 

and in the TPL email template (order_conf_product_list.tpl):

obrazek.png.3754fb110d7df182e27924d8c84a807a.png

 

updated (added in green box):

obrazek.png.c0761e9312bd6c4166ef025744629426.png

 

You can do the same with the ps_emailalerts module 😉

 

 

obrazek.png

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php (Not tested!!!)

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.a18fd747154b5435151d398ab29ddb7e.png

 

and in the TPL email template (order_conf_product_list.tpl):

obrazek.png.3754fb110d7df182e27924d8c84a807a.png

 

updated (added in green box):

obrazek.png.c0761e9312bd6c4166ef025744629426.png

 

You can do the same with the ps_emailalerts module 😉

 

 

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php (Not tested!!!)

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.58e1fab3ef71af719945447229e75209.png

 

and in the TPL email template (order_conf_product_list.tpl):

obrazek.png.3754fb110d7df182e27924d8c84a807a.png

 

updated (added in green box):

obrazek.png.c0761e9312bd6c4166ef025744629426.png

 

You can do the same with the ps_emailalerts module 😉

 

 

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.58e1fab3ef71af719945447229e75209.png

 

and in the TPL email template (order_conf_product_list.tpl):

obrazek.png.3754fb110d7df182e27924d8c84a807a.png

 

updated (added in green box):

obrazek.png.c0761e9312bd6c4166ef025744629426.png

 

You can do the same with the ps_emailalerts module 😉

 

 

ps8modules

ps8modules

Hi.

Availability parameter is not available in PaymentModule.php

obrazek.thumb.png.014b7c44c7bdfbde96869302c255d321.png

updated (added in green box):

obrazek.thumb.png.58e1fab3ef71af719945447229e75209.png

 

You can do the same with the ps_emailalerts module 😉

 

 

×
×
  • Create New...