Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Pulling product product attributes into quantity_box.twig

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 07-03-2019, 08:07 AM
 
David Harrison David Harrison is offline
    
Join Date: Jan 2009
Posts: 1
 

Default Pulling product product attributes into quantity_box.twig

I am trying to modify the quantity box style based on a product attribute. I've been able to do what I want on the product page by calling getAttributeInfo() in quantity_box.twip. However, quantity_box.twip is also used on the cart page and getAttributeInfo() fails there. How can I get a product attribute in quantity_box.twip when on the cart page?

I discovered I can get attributes in /customer/shopping_cart/parts/item.qty.twig by calling getSortedAttributeValues(), but there are two problems. First, there seems to be a bug where getSortedAttributeValues() will only get an attribute if there is more than one value. Second, I can't figure out a way to get a value from item.qty.twig to quantity_box.twip. It seems so strange to me that I can print out the attribute value I want to use next to the quantity box on the cart page, but not be able to do anything with it in quantity_box.twip.

I'm new to this type of programming, so I'm guessing I'm missing some concepts. But boy, this seems far more more difficult to do than it should be.

Thanks
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:59 PM.

   

 
X-Cart forums © 2001-2020