snowdog / module-shipping-latency
Module adds shipping latency
Installs: 41 656
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 9
Forks: 1
Open Issues: 0
Type:magento2-module
Requires
- magento/framework: 100.1.*|101.0.*|102.0.*|103.0.*
- magento/module-catalog: 101.0.*|102.0.*|103.0.*|104.0.*
This package is auto-updated.
Last update: 2024-11-08 16:16:22 UTC
README
1. Installation:
composer require snowdog/module-shipping-latency
bin/magento module:enable Snowdog_ShippingLatency
bin/magento setup:upgrade
2. Usage:
On product list/grid:
$shippingLatencyHelper = $this->helper('Snowdog\ShippingLatency\Helper\Data'); //get shipping latency title per product $shippingLatencyHelper->getTitle($productData); //get full shipping latency popup data (title, btnClass, popupHtml, popupId) for all shipping_latency attribute values $shippingLatencyHelper->getLatencyData(); //get full shipping latency popup data for product $shippingLatencyHelper->getProductLatencyData($productData); //get shipping latency popup CMS block content for product $shippingLatencyHelper->getProductPopupHtml($productData);
On product page:
//get product shipping_latency label $product->getAttributeText('shipping_latency'); //get product shipping_latency value $product->getShippingLatency(); //or use same method like on list/grid
$productData
needs to be an array. On product page use $product->getData()
as parameter:
$shippingLatencyHelper->getProductPopupHtml($product->getData());
Shipping latency options are configured on admin Stores -> Configuration -> Snowdog -> Shipping Latency
.
Default options are set as the previous module version to maintain retro compatibility.