| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Pull product-variant attributes | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Pull product-variant attributes
Is there a way to pull all attributes and options of each product-variant in Complex Schema. In order to do this task I use
PHP Code:
PHP Code:
__________________
Soptareanu Alex |
|||||||
#2
|
|||||||
|
|||||||
Re: Pull product-variant attributes
Why are you using a capital S for 'ValueS'? It should be lower case or else you're not calling that entirely.
For example, see https://devs.x-cart.com/basics/basics-of-working-with-product-attributes.html |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Pull product-variant attributes
getAttributeValueS is for attributeValueS property so the S is correct - that's how the property is defined in the model class - it is for Attribute Value Select
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#4
|
|||||||
|
|||||||
Re: Pull product-variant attributes
Quote:
I also try to put $model->getProduct()->getAttributes() but i got as result this PHP Code:
__________________
Soptareanu Alex |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Pull product-variant attributes
Hi @Soptareanu @Alex,
$model->getAttributeValueS() does not return an empty object. It returns collection of objects, so you should cycle through its child elements and call something like this: Code:
See more in \XLite\Model\AttributeValue\AttributeValueSelect class. Tony Quote:
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
#6
|
|||||||
|
|||||||
Re: Pull product-variant attributes
Quote:
__________________
Soptareanu Alex |
|||||||
|
#7
|
|||||||
|
|||||||
Re: Pull product-variant attributes
Glad you got this fixed!
|
|||||||
#8
|
|||||||
|
|||||||
Re: Pull product-variant attributes
Hello, how can I get the attribute name with attribute value using $model->getAttributeValueS()?
__________________
X-cart Spain www.x-cart.es |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|