customize the code according to your requirement i have written it for one my work where i needed to export products from magento 1. i this code am just taking the sku, id , and price you can take other things as well if you want.
// output headers so that the file is downloaded rather than displayed
header('Content-Type: text/csv; charset=utf-8'...
I am assuming your attribute code is external_link
Now we will add an if condition for external_link code and add a tag like:
You need to create catalog_product_prices.xml into your extension on following path :
Now copy the orginal file content catalog_product_prices.xml from following location :
Now replace following line
I think you should fire the query directly on URL Rewrite table.
$productUrl = Mage::getResourceModel('core/url_rewrite')
->getRequestPathByIdPath('product/' . $productId, $storeId);
ou can try getting the product id as
$product = $observer->getEvent()->getProduct();
$productId = $product->getId();
Hope it was helpful.
You need to put some log at the function \Magento\Catalog\Model\Layer\Category\FilterableAttributeList::getList
this is temporary and therefore can be in the vendor folder directly.
The log we want to use is to know what query runs when the layer filters are pulled in the block \Magento\LayeredNavigation\Block\Navigation
put the lines below just above the ...
It does seem the one that is product attribute that is system does not want to be in the layer.
I will look into it now. Having said that, one would think it might be worth creating a new product attribute identical to the no system one and then 'do assign your data to the new attribute and refresh index..'
that should be a quick win, if you want to do this ...
Your code is 99% right only change this
Replace with this line
$image_source_files = sort($image_source_files);
Click here to show reference
Your code after change
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">