Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 18th, 2012, 06:02 AM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default PHP Category Fields

Hi - I would like to modify our new tree based category list so that the 2nd level empty categories do not include a hyperlink.

e.g. one category goes:

Fitness Equipment -> CardioVascular -> Treadmills, Cross Trainers etc

In this case CardioVascular has zero products and we don't want to show a hyperlink for it.

What I'm looking for is some way to check the value of [category.count total='no']. I know how to OUTPUT that value, but I have not successfully managed to query it.

Something like [category.if count(total)=0] or something like <?php if ($category->count = 0)... ?>

Can you help?
  #2  
Old August 18th, 2012, 08:41 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

$category->pc will give you the total number of products in that category.

$category->pct will give you the total number of products in that category and its subcategories.

Eric
  #3  
Old August 24th, 2012, 12:07 PM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Hi Eric,

Thanks for your help - that did the trick.

I have another question - We don't send users to the product description view although we ARE using the product description view to enable likes on facebook.

What I would really like to do, is if someone clicks a link from facebook, they will land on the product detail page - what I want to do is redirect them to the parent category instead.

I understand that each product can have multiple categories but is there a shortcode that returns these categories?

1) I can modify the php file to check the referred field and not perform this redirect for facebook robot
2) On the category page, I will know which product the redirect came from and then scroll the user to that product and highlight it.

Any help appreciated.

Thanks!
  #4  
Old August 24th, 2012, 12:16 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Your post has been moved to a new thread.

Please only post one topic per thread as per the posting guidelines.

This thread is closed.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML in Custom Fields mattsway Feature Requests 1 May 17th, 2011 12:31 PM
Sort by fields lbuilta59 Feature Requests 1 February 9th, 2011 09:55 AM
Where to find other store fields patagonia Questions 4 January 15th, 2011 01:51 PM


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


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