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 March 6th, 2012, 07:48 PM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default Create a 2 Product Sidebar on the fly in code?

Hi,

Is it possible to create a version of the 2/3 product sidebar directly into a template in a way that does not rely on widgets being created and referenced?

I'd like to be able to hardcode the DFR sidebar into a theme so that it appears whenever DFR is installed and there are products in the store, irrespective of the store's widgets.

If this is possible where the best place to look to learn how it's done? Ideally I'd like to be able to control the various display options and so on direct from the code i put in the template

I think there was a short code equivalent in the old DFR but ideally I'd like a line by line version with the <h> tags and button code and the rest in it:

dfr_product_block('order_by=views&display_details_ button=0&display_description=0&display_price=0&pro ducts_per_block=3');

Thank in advance if anyone can help with this?

Ty
  #2  
Old March 6th, 2012, 08:27 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You always have to reference a View in the Factory. The only way to get around that is by writing your own PHP function which queries the DB.

If you are OK with creating a new View in the Factory, then you can use these shortcodes to call it directly from your WP template files: http://www.datafeedr.com/docs/item/185

Eric
  #3  
Old March 6th, 2012, 08:35 PM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default

Thanks!

If there a DFR PHP function listed anywhere that I could use as a starting point to going in the right direction? I'd really like to avoid making loads of identical widgets in the factory!

Regards
  #4  
Old March 6th, 2012, 09:59 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

The only function that's available is at the bottom of the Docs page I linked to above.

As for making identical widgets, you can now duplicate widgets if that helps.

But I think you'll probably need to write your own query to satisfy your needs.

Eric
  #5  
Old March 6th, 2012, 10:15 PM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default

Quote:
Originally Posted by Eric View Post
As for making identical widgets, you can now duplicate widgets if that helps.
That's great - assuming I can duplicate a Widget from Store A into Store B? I didn't realise this was possible!

Ty
  #6  
Old March 7th, 2012, 08:16 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by firstprod View Post
That's great - assuming I can duplicate a Widget from Store A into Store B? I didn't realise this was possible!
Um... that's not possible.
  #7  
Old March 7th, 2012, 08:26 AM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default

Quote:
Originally Posted by Eric View Post
Um... that's not possible.
Oh right. I'm not sure now being able to duplicate widgets would help if I'm adding a new widget to all my sites then?

Are there any plans to be able to cut and paste categories / product lists / widgets from store to store? It'd be extremely useful in terms of time savings for developing new sites and features.
  #8  
Old March 7th, 2012, 08:45 AM
firstprod firstprod is offline
 
Join Date: Jul 2009
Posts: 71
Default

Quote:
Originally Posted by Eric View Post
The only way to get around that is by writing your own PHP function which queries the DB.
Sorry, my previous question concerning published examples was referring to your comment above. Does a copy of a DFR database query script exist anywhere in terms of taking a look at the code to see what is involved?

Thanks
  #9  
Old March 7th, 2012, 10:37 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by firstprod View Post
Are there any plans to be able to cut and paste categories / product lists / widgets from store to store? It'd be extremely useful in terms of time savings for developing new sites and features.
We did release some bulk functionality in version 3.5. More on that here: http://www.datafeedr.com/forums/showthread.php?t=6159

Quote:
Originally Posted by firstprod View Post
Sorry, my previous question concerning published examples was referring to your comment above. Does a copy of a DFR database query script exist anywhere in terms of taking a look at the code to see what is involved?
Not really... I think your best bet would be to query the DB directly. So much of our code takes into account view parsing.

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
coupon code in product details page jcvm27 Problems 5 January 10th, 2012 01:17 PM
Create 'Single Product' sidebar widget dynamicweb Questions 11 July 27th, 2011 04:48 PM
Associate one coupon code with one merchant on a product page cashnow Questions 2 January 20th, 2011 10:59 PM


All times are GMT -5. The time now is 12:47 PM.


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