Hi!
This is an example of how to pull info about variants:
PHP Code:
<?php
require_once 'top.inc.php';
$product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find(22);
$variants = $product->getVariants();
foreach ($variants as $variant) {
echo 'qty ' . (($variant->defaultAmount) ? $product->getQty() : $variant->amount) .
'; price ' . (($variant->defaultPrice) ? $product->price : $variant->price) . '<br /><br />';
}
This is a PHP script that must be put into X-Cart 5's root folder.
Hopefully, it will help.
If there is further help needed, please explain a bit what result you are trying to achieve. I still did not grasp it. Do you want to list product attributes on product lists (like category pages) or something different?
Tony.