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 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!
  #2  
Old August 24th, 2012, 01:02 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You can use the following PHP function to get the relative URL of the category page (substitute my category ID 591459 with yours):

PHP Code:
dfr("url")->query_to_url('view=category&c=591459'
This returns something like:

/store/category/shoes/

Eric
  #3  
Old August 29th, 2012, 09:48 PM
dhilditch dhilditch is offline
 
Join Date: Feb 2012
Location: In my house
Posts: 108
Default

Is there a similar function which will accept a productid and take me to (any of) the parent category?
  #4  
Old August 29th, 2012, 10:07 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

If you have the product ID, you will already have the category ID to pass to that function. The product's category ID can be found using this variable:

PHP Code:
$product->cat_id 
Here's all of the possible variables of the $product object: http://www.datafeedr.com/forums/show...1079#post31079

Eric
 


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
Cannot click back to parent category when on product details page... daniel_28 Problems 5 July 16th, 2012 06:47 AM
How to redirect old product pages? globalnet Questions 2 April 5th, 2011 09:05 AM
How Can I Get Certain Pages to Redirect cashnow Problems 1 March 16th, 2011 09:29 PM
2 Parent Category Request tkh378 Feature Requests 1 March 2nd, 2011 04:50 PM
How Can I One Category Parent Link to Product Listing? cashnow Questions 3 February 3rd, 2011 05:08 PM


All times are GMT -5. The time now is 02:50 AM.


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