magmodules / magento2-channable Goto Github PK
View Code? Open in Web Editor NEWChannable Connect for Magento® 2
Home Page: https://marketplace.magento.com/magmodules-magento2-channable.html
License: BSD 2-Clause "Simplified" License
Channable Connect for Magento® 2
Home Page: https://marketplace.magento.com/magmodules-magento2-channable.html
License: BSD 2-Clause "Simplified" License
We have a cart price rule set up in Magento that doesn't have a code and so it auto-applies if the items match with the Actions rules when a customer puts them in their cart.
However, when orders are imported through Channable into our Magento shop, they seem to also be running through that logic and so the order prices in Magento don't match what was actually paid on the marketplace (Amazon, in this case).
Is there a setting or a way to have the imported orders bypass any cart pricing rules so that the prices paid on the marketplace are the ones that are also in the Magento order?
In working with Magento's version 2.4.3, when sending an order from the Channable system to Magento, I'm getting the following error:
Channable.INFO: importOrder: xxxxxxxx: Notice: Array to string conversion in vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3170
At that point, the order fails to import. If there's anything I can test out or try for a quick fix, let me know.
Thanks!
Channable needs to know the product collection size on two occasions:
To do this, the COUNT-query is executed twice. This introduces a performance issue when using a large product set.
Hi, when you enable Asynchronous Order Processing(link), the cron that takes care of this, raises an error:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'channable_id' cannot be null, query was: INSERT INTO
sales_order_grid (
entity_id,
status,
store_id,
store_name,
customer_id,
base_grand_total,
base_total_paid,
grand_total,
total_paid,
increment_id,
base_currency_code,
order_currency_code,
shipping_name,
billing_name,
created_at,
updated_at,
billing_address,
shipping_address,
shipping_information,
customer_email,
customer_group,
subtotal,
shipping_and_handling,
customer_name,
payment_method,
total_refunded,
signifyd_guarantee_status,
channable_id,
channel_id,
channel_name,
channel_label) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE
entity_id = VALUES(
entity_id),
status = VALUES(
status),
store_id = VALUES(
store_id),
store_name = VALUES(
store_name),
customer_id = VALUES(
customer_id),
base_grand_total = VALUES(
base_grand_total),
base_total_paid = VALUES(
base_total_paid),
grand_total = VALUES(
grand_total),
total_paid = VALUES(
total_paid),
increment_id = VALUES(
increment_id),
base_currency_code = VALUES(
base_currency_code),
order_currency_code = VALUES(
order_currency_code),
shipping_name = VALUES(
shipping_name),
billing_name = VALUES(
billing_name),
created_at = VALUES(
created_at),
updated_at = VALUES(
updated_at),
billing_address = VALUES(
billing_address),
shipping_address = VALUES(
shipping_address),
shipping_information = VALUES(
shipping_information),
customer_email = VALUES(
customer_email),
customer_group = VALUES(
customer_group),
subtotal = VALUES(
subtotal),
shipping_and_handling = VALUES(
shipping_and_handling),
customer_name = VALUES(
customer_name),
payment_method = VALUES(
payment_method),
total_refunded = VALUES(
total_refunded),
signifyd_guarantee_status = VALUES(
signifyd_guarantee_status),
channable_id = VALUES(
channable_id),
channel_id = VALUES(
channel_id),
channel_name = VALUES(
channel_name),
channel_label = VALUES(
channel_label)
.
This error is shown in the cron_schedule table for job_code
sales_grid_order_async_insert
.
At this moment I'm not sure if this is something you can fix or if this is a shortcoming of the async functionality.
Version 1.6.0 / Magento version 2.3.7-p2
/vendor/magmodules/magento2-channable/Model/Config/System/OrderRepository.php line 157.
The order id prefix configuration returns a boolean instead of the saved string. This results in a 500 error.
Hi,
After updating the module to 1.4.6 the paging is not working and only the first page size is send to Channable. We are currently running at Magento 2.2.7. I assume that this is caused by the release that fixes the paging issue (1.4.2) for 2.3.
Thanks
Stefan
The $config['inventory'] array only has the attributes
key. This prefends use from using the Quantity attribute in the channable feed. Because it will always show it as "out of stock"
There are no requirements in your composer.json.
Nothing about PHP version or Magento version.
This is sad guys.
In \Magmodules\Channable\Helper\Product
, when calling processPrice, the $config variable does not contain the ['price_config] key anymore. This did exist in 1.5.2.
As a result, all isset() calls on values inside it return false, so any exchange rates/configuration is ignored.
Model/Item.php - Line 367
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
Helper/General.php - Line 196 and Line 219
$value = @unserialize($value);
Upgrade to Magento 2.2 gives this error:
1 exception(s):
Exception #0 (InvalidArgumentException): Unable to unserialize value.
Exception #0 (InvalidArgumentException): Unable to unserialize value.
#0 vendor/magento/module-config/Model/Config/Backend/Serialized.php(55): Magento\Framework\Serialize\Serializer\Json->unserialize('a:357:{s:18:"_1...')
#1 vendor/magento/framework/Model/AbstractModel.php(601): Magento\Config\Model\Config\Backend\Serialized->_afterLoad()
The reason is that Magento changed their way serialized is stored in the database.
Before Magento 2.2, this was as serialized but from 2.2 is is like json_encoded.
There seems to be a compatibility issue with the latest version of the Amasty Shop By module (v1.18.4). The issue breaks all the direct links to filter pages; f.e. domain.com/filter/brandname, resulting in a lot of 404 not found pages.
I've reached out to Amasty and they have replied with the following;
To resolve this issue, a following file was changed:
vendor/magmodules/magento2-channable/Plugin/AroundIsAllowedRequest.php
And here's the link to download the changed file: 357024.97.zip
Could you check if can be fixed from your side? If you need more information, please let me know.
We have a Magento ver. 2.2.0 and installed the channable extension and connect this Magento on https://app.channable.com/
On this Magento, we have installed Amasty Sorting extension and when we want to download/add products on https://app.channable.com/ we have an error
We could not import the Magento product information Solution: We recommend an unrecognizable answer from the Magento plugin, check whether the plugin is installed correctly. Follow this support article to check your Magento plugin...
After checking the backend code, we have found that issue is with this extension (channable extension is trying to find DB unknown table name, probably DB table alias name from Amasty extension ). If this extension is disabled, the importer is working.
This is not a real issue, but I did not know where else to go.... I'm looking into the release notes and code and I see quite some times LVB
. What does it stand for?
We've been debugging an issue since we configured the Channable module to not import customers ("Stores > Configuration > Magmodules > Order Import > Import Customers" => "No").
Since we configured the Channable module not to import customers we kept getting the below response when Channable tried to send orders to Magento (/channable/order/hook
).
{"validated":"false","errors":"Failed address validation:\nEmail has a wrong format"}
Inside Magento\Quote\Model\Quote\Address\ToOrderAddress::convert(Address $address, $data = [])
the $data
argument is used to pass additional information into the resulting address ($orderAddress
).
In Magento\Quote\Model\QuoteManagement:submitQuote(QuoteEntity $quote, $orderData = [])
this method is used to convert the quote address into an order address (line 520 and 532).
In both cases the $data
argument is passed with two keys. address_type
and email
, which are meant to additionally add "address_type" and "email" to the resulting order address. It though seems that $quote->getCustomerEmail()
(which is used for the email
key) is returning null
, resulting in the e-mail being passed to be null
as well (causing the validation failure).
Why is this? Depending on the checkout method for the quote ($quote->getCheckoutMethod()
) the customer information is set (Magento\Quote\Model\QuoteManagement::placeOrder
on line 387). But debugging this it seems that the checkout method is not set for the quote ($quote->getCheckoutMethod()
returning null
). Which is causing the customer e-mail not to be set etc.
Inside Magmodules\Channable\Model\Order
the customer information of the quote is set depending on the $this->importCustomer
("Stores > Configuration > Magmodules > Order Import > Import Customers").
It might be enough to set the checkout method using ->setCheckoutMethod(CartManagementInterface::METHOD_GUEST)
method.
else {
$customerId = 0;
$cart->setCustomerId($customerId)
->setCustomerEmail($email)
->setCustomerFirstname($data['customer']['first_name'])
->setCustomerMiddlename($data['customer']['middle_name'])
->setCustomerLastname($data['customer']['last_name'])
->setCustomerIsGuest(true)
->setCustomerGroupId(GroupInterface::NOT_LOGGED_IN_ID)
** ->setCheckoutMethod(CartManagementInterface::METHOD_GUEST); **
}
\Magento\Quote\Model\Quote::validateMinimumAmount()
Please add PWA support fetching urls are not working on PWA template.
Since we updated the extension to version 1.4.7, no configurable products will be added to the feed when the stock filter is enabled.
I think this is caused by a change in this commit:
464856e#diff-653dbe4738abac6f25c4d1e94b4337cc
Where in Helper/Product.php the line
if ($parent->getIsInStock() == 0) {
Is replace by
if ($parent->getIsSalable() && $parent->getIsInStock()) {
This means that a product where his parent is salable and has stock, the simple product cannot be validated.
Maybe it has to be:
if (!$parent->getIsSalable() || !$parent->getIsInStock()) {
Hi Magmodules,
I'm working on debugging an issue which involves order information which is handled by another third-party extension. I'm looking for a way to change order data related to the customer address information when using the webhook.
Is there a way to specify a custom invoice and shipment address when generating a test order?
This change 947c4a1#diff-5644b19765ce306fc588f975adb8f3bc breaks the feed for simple products in a configurable product. Image links are missing and the link to the product is incorrect.
Workaround is to stay on 1.4.3.
In Magmodules\Channable\Helper\Source::getProductFilters all visibility types will be added when: if (!empty($filters['relations'])) { this results in a very complex and slow query when Magmodules\Channable\Model\Generate::generateByStore calls getCollectionCountWithFilters.
When replacing:
array_push($filters['visibility'], Visibility::VISIBILITY_NOT_VISIBLE);
to:
$filters['visibility'] = array();
in Magmodules\Channable\Helper\Source the query gets processed a lot faster.
During install bin/magento setup:upgrade we see this message (seen first now)
Can it be a doc block is missing; would have been nice if the logging showed us which method
Each method must have a doc block. See Magento\Eav\Api\AttributeSetRepositoryInterface::getList()
Maybe do quick inspect? https://blog.jetbrains.com/phpstorm/2011/05/phpdoc-inspections/
I am not sure this is blocking, but after running install for this module we also see this in our logs
`[2019-04-22 13:08:40] main.ERROR: Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Magmodules_Channable data: current version - none, required version - 1.4.5 [] []`
"bin/magento setup:upgrade" was of course run (several times now)
Installation was done like
composer require magmodules/magento2-channable
bin/magento module:enable Magmodules_Channable
bin/magento setup:upgrade
executing ` bin/magento module:disable Magmodules_Channable
The following modules have been disabled:
So something must be going wrong here
The query to determine the product collection for a single page is terribly slow. This slowdown is caused by a suboptimal ORDER BY
statement which results in the database having to use filesort.
I was working through the 2.3.2 release and testing things out and, overall, there's nothing terribly breaking in there. There are some security fixes around the APIs which may have something to do with this and then there's some changes around orders too.
In any case, when I was making sure that orders from Channable were imported into Magento on 2.3.2 (using version 1.4.9 of the extension), the Channable dashboard reported a 302 error each time and the order failed to be imported. There was no log information either, so I'm not fully sure what the issue really is.
Let me know if there's anything I can test out on my end or any known information on this. Thanks!
For one of our clients we run into the following error that prevents the feed to be generated correctly:
Channable.INFO: Generate: Notice: Trying to access array offset on value of type bool in
.../vendor/magmodules/magento2-channable/Model/Item.php on line 118 [] []
After adding some logging it seems that in this case the $row is false. Adding an extra if statement fixes the problem temporary but it shouldn't be possible to get a false here.
We run version 1.4.20.
The issue has been occured since we're on php 7.4 and mysql 8 with Magento 2.4.1-p1.
I hope you can reproduce the issue.
Hi,
We are using Channable together with bol.com and all the products on bol.com have shipping and FPT (Fixed Product Tax) costs already included. Once an order is placed at bol.com and exported to Magento, the shipping and FPT costs are added for those products again. This leads to incorrect values in the orders in Magento and in the invoices that clients receive.
I managed to fix the problem with shipping costs by simply adding $shippingAddress->setData('free_shipping', true);
inside importOrder
function within Order
class.
The FPT costs are a completely different story. I tried removing the Weee
(FPT) costs from the quotes that are created, but it solved it only partially. I could see correct prices in the items list within the order, but the Grant Total
and Subtotal
amounts of the order still contained the FPT costs.
Do you have any suggestion on how could I solve it?
Magento version 2.1.9
PHP 7.0
When doing bin/magento setup:upgrade.
Im getting an error PHP Fatal error: Cannot use Magento\Config\Model\ResourceModel\Config as Config because the name is already in use in /vagrant_data/score/httpdocs/vendor/magmodules/magento2-channable/Helper/General.php on line 13
We have a Magento Commerce 2.2.7 shop with the Channable 1.4.0 version. We have the configuration setup that for simple products that are part of a grouped product the parent grouped product url needs to be send to channable instead of the simple product url.
The above works for older products but new products since half a year are not having the grouped product url.
We looked into this and it seems its caused by the row_id and entity_id table data for products in the magento database.
The product link table is connected to the product row_id instead of the entity_id table and for newer products the row_id and entity_id table are not the same anymore. The code is linking parent products as entity_id instead of row_id.
The expected result is that all simple products can make correct use of parent attributes.
Hi guys
This was encountered with version 1.0.8 of your Channable module installed.
When running bin/magento setup:store-config:set --base-url="https://blah.example/"
We get this error:
[Magento\Framework\Exception\LocalizedException]
Area code is already set
This problem is triggered by the setAreaCode
code in:
Explanation: every time you run bin/magento
it executes all constructors of all registered cli commands. So this means all the constructors of your channable:***
cli commands get executed even when executing another non-related bin/magento
command.
You can very easily test this by echoing something from the constructors and running whatever bin/magento
command, and you will always see the output from your commands in every other command.
So you should only use the constructor of these commands to initialize a bunch of variables, but please don't execute logic, and certainly not logic which manipulates a global state (like setting the area code).
The correct way, would be to change the area code in the execute
method, but certainly not in the constructor.
This is a really big problem and should be resolved quickly in my opinion.
Thanks! :)
I'm using Magento Commerce and have tested this on 2.3.1 and 2.3.2. For versions of the extension 1.4.6 and up, our feed always times out. To fix this, I've been able to revert the following files to the 1.4.5 version:
Helper/Product.php
Model/Collection/Products.php
Model/Item.php
After that, the feed generates again after about a 30 second wait.
Our feed is heavily loaded with configurable products and contains about 32,000 in stock items that get passed to Channable.
Let me know if any more environment information would help to see what's causing this issue.
On Magento 2.4.2-p1 commerce with Magento2-channable 1.5.1, it's not possible to schedule category changes.
But this popup is expected:
In the logs, we see:
Exception #0 (Magento\Framework\Exception\LocalizedException): The "componentType" configuration parameter is required for the "channable" component.
#1 Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem() called at [vendor/magento/framework/View/Element/UiComponentFactory.php:334]
Is this a known issue?
a:4:{i:0;s:124:"Notice: Array to string conversion in /vendor/magmodules/magento2-channable/Helper/Product.php on line 375";i:1;s:10584:"#0 /vendor/magmodules/magento2-channable/Helper/Product.php(375): Magento\Framework\App\ErrorHandler->handler(8, 'Array to string...', '/data/web/magen...', 375, Array)
tice: Array to string conversion in /vendor/magmodules/magento2-channable/Helper/Product.php on line 375
Issue is probably because of selecting 'meta_robots' as field.
This is not logical, but anyway, it should not create an error.
Issue in code:
if ($attribute['type'] == 'select') {
if ($attr = $product->getResource()->getAttribute($attribute['source'])) {
$value = $product->getData($attribute['source']);
return (string)$attr->getSource()->getOptionText($value);
}
}
Proposal to fix:
if ($attribute['type'] == 'select') {
if ($attr = $product->getResource()->getAttribute($attribute['source'])) {
$value = $product->getData($attribute['source']);
$data = $attr->getSource()->getOptionText($value);
if(is_array($data)){
if(count($data) > 0) return current($data);
return '';
}
return (string)$data;
}
}
Webhook for creating orders doesnt work. results in an 302 redirect.
ik found out it was in de Magento\Framework\App\FrontController:136
the validate fails. because you post without an formkey
=> Magento\Framework\App\Request\CsrfValidator:71
adding ?ajax=true
to the url solves the problem.
Sidenote: i found out that payment module Mollie does the same thing with there hooks ;-)
A simple swap of the parameters should fix this error:
Error for https://www.[domain].com/nl/channable/order/hook {"validated":"false","errors":"Deprecated Functionality: implode(): Passing glue string after array is deprecated. Swap the parameters in \/home\/[user]\/[domain]\/releases\/20210525094409\/vendor\/magmodules\/magento2-channable\/Model\/Order.php on line 519"}
I've been talking with the support email about this but wanted to bring it up here to see if there was any other feedback.
There’s a issue at https://bugs.mysql.com/bug.php?id=97709 and the second to last comment mentions that including a WHERE id > 0 makes SELECT COUNT queries work with execution timing more like SQL 5.7 (or comparable MariaDB versions).
After adding a filter to the product collection in the Model/Collection/Products.php to filter entity_id greater than 0, I was able to get the self-test to run much faster which makes me think that there’s something to the bug but possibly a way to work around this to allow for feed generation to work more efficiently.
Thanks!
Hello,
We found out that bundles are not exported to the channable feed. If we look in the JSON or preview output the bundle id's are missing from the feed. After a peek in the code it looks like it is missing from the filters: Source.php @ Line 351 Is this a know issue?
With the latest Channable 1.0.12 + Magento 2.2.2
When opening the "Channable: Orders & Items", I get on my server a white page.
On my development environment, I get the follow error:
1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in vendor/magento/module-shipping/Model/Config/Source/Allmethods.php on line 61
Exception #0 (Exception): Notice: Array to string conversion in vendor/magento/module-shipping/Model/Config/Source/Allmethods.php on line 61
#0 vendor/magento/module-shipping/Model/Config/Source/Allmethods.php(61): Magento\Framework\App\ErrorHandler->handler(8, 'Array to string...', '/Users/jw/Proje...', 61, Array)
#1 vendor/magento/module-config/Model/Config/Structure/Element/Field.php(458): Magento\Shipping\Model\Config\Source\Allmethods->toOptionArray(false)
#2 vendor/magento/module-config/Model/Config/Structure/Element/Field.php(376): Magento\Config\Model\Config\Structure\Element\Field->_getOptionsFromSourceModel(Object(Magento\Shipping\Model\Config\Source\Allmethods))
Looking into this Magento code on this line:
'label' => '[' . $carrierCode . '] ' . $methodTitle,
At the $carrierCode = 'usps', I get an array returned.
This results in this error.
This carrier is actually not used.
Upgraded Channable for customer and now getting errors on certain (complete) orders (not all), not sure why.
Error is:
1 exception(s):
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId = 958695 #1 Magento\Quote\Model\QuoteRepository->loadQuote() called at [vendor/magento/module-quote/Model/QuoteRepository.php:136] #2 Magento\Quote\Model\QuoteRepository->get() called at [vendor/magento/framework/Interception/Interceptor.php:58] #3 Magento\Quote\Model\QuoteRepository\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #4 Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #5 Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins() called at [generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php:23] #6 Magento\Quote\Model\QuoteRepository\Interceptor->get() called at [vendor/magmodules/magento2-channable/Block/Adminhtml/Order/Totals.php:54] #7 Magmodules\Channable\Block\Adminhtml\Order\Totals->initTotals() called at [vendor/magento/module-sales/Block/Order/Totals.php:64] #8 Magento\Sales\Block\Order\Totals->_beforeToHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1110]
Ends up here:
Magmodules\Channable\Block\Adminhtml\Order\Totals.php
public function initTotals()
{
$quoteId = $this->getOrder()->getQuoteId();
$quote = $this->quote->get($quoteId);
Seems to happen on orders that are already complete and customer ran into this when she tried to credit one of these. The quoteId is available but the next step "$quote = $this->quote->get($quoteId);" fails. Still investigating why but in order for the customer to continue her work I have made the following quick fix:
For now the quick fix is
$quoteId = $this->getOrder()->getQuoteId();
if(isset($quoteId) && $quoteId > 0) {
try {
$quote = $this->quote->get($quoteId);
} catch (\Exception $exception) {
// later / custom logging
}
if (isset($quote)) { ...
As soon as I have more information I will add it.
We are using Magento's MSI and the stock availability and qty are Out of Stock and 0 for every product we have, which is of course not correct. Any idea?
When Channable orders are created in Magento the currency that was set in Channable isn't used in Magento, this is especially true if multiple countries are imported on the same storeview in Magento.
Eg. An order is created for a channable order of 1000 Norwegian krone but the order is created in Magento for 1000 euro because the storeviews default currency is euro. Even though the storeview allows NOK in a currency switcher.
Magmodules\Channable\Model\Order line 238:
$cart = $this->cartRepositoryInterface->get($cartId)->setStore($store)->setCurrency()->setIsSuperMode(true);
I believe properly setting the currency on this line will fix this issue.
Orders aren't added to the sales_order
table, because of the following error:
Return value of Magmodules\Channable\Service\Order\Shipping\CalculatePrice::execute() must be of the type float, string returned in /vendor/magmodules/magento2-channable/Service/Order/Shipping/CalculatePrice.php:67
Proposed solution:
Change line 67 from return $shippingPriceCal;
to return (float) $shippingPriceCal;
Currently it's only possible to export categorie paths (and levels) based on
magento2-channable/Helper/Source.php
Line 781 in 782cea9
As stated in the title we would like to be able to add up to 3 address lines:
Currently the logic seems to be almost ready to to this (almost like it was already planned by not / poorly executed). https://github.com/magmodules/magento2-channable/blob/master/Model/Order.php#L542 The logic allows you to separate the house numbers and the if else
would allow you to also have the house_number_ext separated, but the else
can never be reached (empty(0)
would return false
, and the only other possible value is 1
).
Proposed solution: Add an extra option to seperate_housenumber
"No", "Separate number", "Separate number and addition"
There is a problem at :
vendor/magmodules/magento2-channable/Model/Collection/Products.php
The following code defines the aliases as array keys (0,1,2.....). When the Shared Catalog module beforeLoad() plugin hits, it wants to use 0 as well.
if (!empty($config['inventory']['attributes'])) { $collection->joinTable( 'cataloginventory_stock_item', 'product_id=entity_id', $config['inventory']['attributes'] ); }
The fix is simple, generate unique aliases like 'channable_qty' or 'channable_is_in_stock'.
QND fix for now so that the exporter works again:
if (!empty($config['inventory']['attributes'])) { foreach($config['inventory']['attributes'] as $key => $value) { $config['inventory']['attributes'][$value] = $config['inventory']['attributes'][$key]; unset($config['inventory']['attributes'][$key]); } $collection->joinTable( 'cataloginventory_stock_item', 'product_id=entity_id', $config['inventory']['attributes'] ); }
Environment:
PHP - 7.0
Magento - upgraded to 2.2.2
Channable extension - 1.0.12 (installed via composer)
This is what the first page of the product feed (channable/feed/json/ request) returns:
"products_total":1,
"products_limit":"50",
"products_output":50,
"products_pages":1,
"current_page":1,
"next_page":"false",
"products_total", "products_pages" and "next_page" are incorrect.
Looking at the extension code, I see that the source of this bug is in the magmodules/magento2-channable/Model/Collection/Products class, getCollectionCountWithFilters() method:
public function getCollectionCountWithFilters($productCollection)
{
$selectCountSql = $productCollection->getSelectCountSql();
$connection = $this->resource->getConnection(ResourceConnection::DEFAULT_CONNECTION);
$count = $connection->fetchAll($selectCountSql);
return count($count);
}
var_dump($count):
array(1) {
[0]=>
array(1) {
["COUNT(DISTINCT e.entity_id)"]=> string(3) "841"
}
}
and then count($count) always returns:
int(1)
If I use this instead:
return array_shift($count[0]);
I get the correct response:
"products_total":"841",
"products_limit":"50",
"products_output":"50",
"products_pages":"17",
"current_page":"1",
"next_page":"true"
I checked the latest stable release of the extension, but the same problem persists, so the upgrade wouldn't suffice.
Could you please take a look at this issue and give me feedback when you expect it to be corrected?
Hello,
I was looking into some help with the Channable Feed module.
page=xx
to get the paged results. But are there more options?Hope this question is a bit clear, if not let me know..!
The qty increments product setting is wrong displayed in our feed..
Debugging the code showed in Helper/Product.php line 642:
if (!$product->getData('enable_qty_inc')) {
return false;
}
I think it should be changed to
if (!$product->getData('enable_qty_increments')) {
return false;
}
since in the cataloginventory_stock_item the field is "enable_qty_increments".
After changing the feed is right.
Orders created through the channable Module are missing item_id
data in the sales_order_tax_item
table.
(item_id
refers to the sales_order_item
.item_id
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.