Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   New "compset_status" variable (/showthread.php?t=4105)

grooves1200 March 11th, 2011 06:40 AM

New "compset_status" variable
 
Eric,

Can you provide some insight or examples into how we can use the new "compset_status" variable that's in the latest update?

Thanks!

Eric March 11th, 2011 08:35 AM

Hi

This is the variable you have access to:

$product->compset_status

It's value corresponds to:

= 2 -- master product
= 1 -- compset member
= 0 -- not a part of any compset

You can use it within a product loop ([product.each ... [product.end]) like this:

PHP Code:

<?php if ($product->compset_status == 1) { ?>
<a href="[product.link]" class="dfbutton dforange dfmedium">Compare Prices</a>
<?php } else { ?>
<a href="[product.link]" class="dfbutton dforange dfmedium">Details</a>
<?php ?>

Eric

grooves1200 March 12th, 2011 02:30 PM

So in the example you provide, what could you specifically do with it? Can you only show master products, for example, instead of all compset members?

Eric March 12th, 2011 04:46 PM

Quote:

Originally Posted by grooves1200 (Post 18834)
Can you only show master products, for example, instead of all compset members?

Yes, you can do that. Just add compset_status=2 to the Query String field for your product list and only products that are master products will be returned.


grooves1200 March 12th, 2011 04:54 PM

Awesome! Thanks!

grooves1200 March 19th, 2011 04:42 PM

So as a follow-up can you create a query to drip from one category and only master products from that category?

c=123456 & compset_status=2

if you can provide the correct string, that would be very helpful.

thanks

Eric March 19th, 2011 06:02 PM

Hi

I haven't tested it but you have provided the exact code:

c=123456&compset_status=2

Eric


All times are GMT -5. The time now is 01:13 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.