santiagonra Posted October 14, 2020 Share Posted October 14, 2020 Hi! I need to have the id_product_attribute (aka Product Combination ID) for each combination in my Product page. So far I have been able to get the id_product_attribute for the selected current combination. But what I really need is to have all the ids. This is what I have in my product.tpl <div id="mobileProductViewer" class="col-md-6"> <input type="hidden" id="combinationId" value="{$product.id_product_attribute}"> </div> That generates a hidden input with just one combination id. I would need all the ids for the combinations. And is it possible to get also what that ID represents? I mean something like this: 167 - Red - XL I hope I coud explain myself. Thanks in advance!!! Link to comment Share on other sites More sharing options...
Guest Posted October 15, 2020 Share Posted October 15, 2020 Why put it in product.tpl? You would have to add a variable to Product.php. A better way is to paste the code into product-variants.tpl Link to comment Share on other sites More sharing options...
santiagonra Posted October 15, 2020 Author Share Posted October 15, 2020 Thanks so much for you answer! I tried your code, it works, but it's not exactly what I need. What I need is each combination number. You can see it on the url on the image that I attached. Every combination has this id, for example: RED-S : 286 RED-M: 134 WHITE-L: 122 So what I need is to have all the combinations ids on my product page. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now