Comments (4)
Hi,
By default no attributes are returned in product list mode, but it is possible to add additional fields and attributes to return in XHR result for product list.
Note, if an additional attribute is added to the product list, all attributes on each product is mapped to the product since the attribute_value field will be added to product attributes. This can have a big impact on the performance if installation contains many products and attributes.
Also note that by default the "card" partial is used in both "vue" and "extbase" mode, so some special condition might be needed to make the cards work in both "vue" and "extbase" mode.
An alternative that doesn't impact the performance like attributes might do is to extend the product model and then include additional fields to the XHR result for product list.
See:
https://docs.typo3.org/p/pixelant/pxa-product-manager/main/en-us/Configuration/Index.html#settings-listview-additionalfields
and
https://docs.typo3.org/p/pixelant/pxa-product-manager/main/en-us/Developers/ModelExtender/Index.html
from pxa_product_manager.
A way to see what data that is returned to the product list is by checking the network and the Fetch/XHR result (type 1606131593). There is no "attribue_value" key in the "list" result, so it should look something like: product.xxx1.label
and product.xxx1.data
, but the data can look different depending on the type of the fetched attribute, e.g. an array.
from pxa_product_manager.
While we don't have a lot of products, the first example is the preferred one.
Shouldnt this code work then?
plugin.tx_pxaproductmanager.settings.listView.additionalAttributes = xxx1, xxx2
plugin.tx_pxaproductmanager.settings.listView.includeEmptyAdditionalAttributes = xxx1, xxx2
Inside partial/cards then added following:
<f:section name="productName"> <f:if condition="!{product}"> <f:then> <div class="item-title"> <span class="product-item-text product-item-title" v-text="product.name"></span>{product.attribute_value.xxx1} </div> </f:then> <f:else> <div class="item-title"> <span class="product-item-text product-item-title">{product.name}</span> </div> </f:else> </f:if> </f:section>
Still no Attribute xxx1 inside of the Listview.
Is {product.attribute_value.xxx1} or {product.attribute.value.xxx1} right?
Regards and thanks in advance.
from pxa_product_manager.
Thx. Now at least it works for the non-array attribute. ;)
Fetching the XHR Result helped too.
Any solution, how to iterate, if the data is in an array. i am not found of how to render/itterate any vue mode version array.
For Attribute with Option Array (rendering the whole array as a string works thou, itterating doesn't):
{ "pid": 84, "title": "xxx2", "uid": 2, "value": "xxx2" }
I cant even adress the first attribute xxx1 (no array) without the Viewhelper "v-text" in Partial/Cards Fluid Template (I assume it's the same reason i can't itterate):
<span class="product-item-text product-item-title" v-text="product.xxx1.data"></span>
works
{product.xxx1.data}
isn't
from pxa_product_manager.
Related Issues (20)
- [BUG] Attribute label and name doesn't get translated in fluid template
- [BUG] indexed solr images should be "processed", not just the "publicUrl"
- [FEATURE] Complete and replace external google docs-documentation with rendered REST-documentation HOT 2
- [TASK] Add valuable links to README
- [TASK] Move documentation from README to Documentation/
- Call to undefined method Doctrine\DBAL\Driver\Mysqli\MysqliStatement::fetchAllAssociative() HOT 3
- [BUG] Cannot set Attribute in Filter HOT 1
- Route Enhancer not working with v11 [BUG] HOT 7
- [FEATURE] Related products by category HOT 1
- [BUG] Sorting "Product Renderer" List not working HOT 2
- [FEATURE] Lazy loading back button (Product Renderer List & Show)
- After Updates all products gone HOT 8
- [BUG] translation of additionalAttributes for list not working HOT 3
- [BUG] translation filter not working HOT 1
- Product list not appearing in frontend HOT 5
- [BUG] Non-admins unable to set initial attribute value
- [BUG]: Attributes not working HOT 2
- [BUG] SQL Error on filter category caused by 'groupBy('tpppm.uid_local')' HOT 1
- [FEATURE] TYPO3 v12 support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pxa_product_manager.