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 January 3rd, 2015, 08:43 PM
marckes1 marckes1 is offline
 
Join Date: Nov 2014
Posts: 14
Default Slide Show, Brand Dropdown Menu Code

Store ID: 46560
Website URL: www.bodybuildingandfitnesslab.com
URL to page in question: http://www.bodybuildingandfitnesslab.com/store

Hi,

Is it possible to add a product slideshow to the store home page?

Also, when I add merchant ads to my primary sidebar, I can't access my catergories.
If I add one, I can't access them from the site home page, but can from the store home page, if I add more three I can't access the catergories at all.
Once I remove the ads I can access the catergories again from anywhere on the site.
Is this a wordpress or a datadfeer issue?

With the Drop down Menu
http://www.datafeedr.com/forums/showthread.php?t=6778
I'm have no idea about code, I have created the menu in the factory by copying the code into the Widget default text. But I don't want to mess up the file on the website end. Do you
place the required code after all other code? Below is the last section of code on my site.
I assume I use the code editor to add the required code?

function affilo_glide_widget_tabbed_posts_header() {
return <<<HTML

<div id="recentpoststab" class="single-tab active-tab"><div class="tab-inner-glow"><span>Recent</span><span> Posts</span></div><!--glow--></div>
<div id="popularpoststab" class="single-tab"><div class="tab-inner-glow"><span>Popular</span><span> Posts</span></div><!--glow--></div>
<div id="commentstab" class="comment-tab single-tab"><div class="tab-inner-glow">Comments</div><!--glow--></div>
<div class="clear"></div>

HTML;
}
function affilo_glide_home_content() {
while ( have_posts() ) : the_post();
if (is_page()) { ?>
<div class="entry-content">
<?php the_content() ?>
<?php edit_post_link(__('Edit', 'affilo'),'<span class="edit-link">','</span>') ?>
<?php get_template_part( 'hidden-meta' ); ?>
</div><!-- .entry-content -->
<?php }
else { get_template_part( 'loop', 'home' ); }
endwhile;
}


?>


Thanks
Marc
  #2  
Old January 4th, 2015, 09:29 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi Marc

Quote:
Is it possible to add a product slideshow to the store home page?
This is not a feature Datafeedr has. You could possibly use another plugin to do this but I'm not sure how.

Quote:
Is this a wordpress or a datadfeer issue?
It's hard to say without seeing the problem on your site. As it is, your categories are appearing fine for me.

Quote:
Do you
place the required code after all other code?
You need to place the code above the final closing ?> tag.

Eric
  #3  
Old January 4th, 2015, 10:40 PM
marckes1 marckes1 is offline
 
Join Date: Nov 2014
Posts: 14
Default

Hi Eric,

I entered the code and got this error, I may be in the wrong file?? Below is the section where I entered the code. Let me know what you think.

Thanks
Marc

Parse error: syntax error, unexpected end of file in /home1/marckes1/public_html/wp-content/themes/affilotheme_glide/functions.php on line 310


HTML;
}
function affilo_glide_home_content() {
while ( have_posts() ) : the_post();
if (is_page()) { ?>
<div class="entry-content">
<?php the_content() ?>
<?php edit_post_link(__('Edit', 'affilo'),'<span class="edit-link">','</span>') ?>
<?php get_template_part( 'hidden-meta' ); ?>
</div><!-- .entry-content -->
<?php }
else { get_template_part( 'loop', 'home' ); }
endwhile;
}
function dfr_get_brands_list() {
global $wpdb;
$brands = $wpdb->get_results("SELECT brand FROM ".$wpdb->prefix."dfr_shop_products GROUP BY brand");
$list = array();
foreach ($brands as $brands) {
$brand = trim($brands->brand);
if ($brand != "") {
$list[] = $brand;
}
}
return $list;
}

function dfr_get_merchants_list() {
global $wpdb;
$merchants = $wpdb->get_results("SELECT merchant, merchant_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY merchant");
$list = array();
foreach ($merchants as $k => $v) {
$merchant = trim($v->merchant);
if ($merchant != "") {
$list[$v->merchant_id] = $merchant;
}
}
return $list;
?>
  #4  
Old January 5th, 2015, 12:04 AM
marckes1 marckes1 is offline
 
Join Date: Nov 2014
Posts: 14
Default

Hi Eric,

I have entered the code and have the drop down menu on the site.
Can the brand menu be shortened as it is quite wide and I can't see the direction arrows on the site. Also when if I click on a brand and click GO that brands products show up, but if I pick a merchant as well is says the store is empty. See Below.

Welcome to our Store!
You can find all your home gym and fitness equipment, supplements, clothing and accessories right here!

There are no products in the store.


Edit

Is it possible to change the merchant tab to a catergory tab, so user can find the brands available in there areas AUS/NZ, USA/CAN and UK rather than by merchant.
Would this work:
TEXT:
<form method="get">

<!-- Brand drop down select menu -->
<select name="brand">
<?php echo dfr_get_brands(); ?>
</select>

<!-- catergories drop down select menu -->
<select name="Catergories_id">
<?php echo dfr_get_catergories(); ?>
</select>

<!-- subcatergories drop down select menu -->
<select name="net_id">
<?php echo dfr_get_subcatergories(); ?>
</select>

<input type="submit" value="Go" />

</form>

PHP:
function dfr_get_brands() {
global $wpdb;
$brands = $wpdb->get_results("SELECT brand FROM ".$wpdb->prefix."dfr_shop_products GROUP BY brand");
$html = '<option value="">Select a brand</option>';
foreach ($brands as $brands) {
if (trim($brands->brand) != "") {
$selected = (strip_tags(stripslashes($_GET['brand']))==$brands->brand) ? ' selected="selected"' : '';
$html .= '<option value="'.$brands->brand.'"'.$selected.'>'.$brands->brand.'</option>';
}
}
return $html;
}

function dfr_get_catergories() {
global $wpdb;
$catergories = $wpdb->get_results("SELECT catergories, catergories_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY catergories");
$html = '<option value="">Select a catergories</option>';
foreach ($catergories as $k => $v) {
if (trim($v->catergories) != "") {
$selected = (strip_tags($_GET['catergories_id'])==$v->catergories_id) ? ' selected="selected"' : '';
$html .= '<option value="'.$v->catergories_id.'"'.$selected.'>'.$v->catergories.'</option>';
}
}
return $html;
}

function dfr_get_subcatergories() {
global $wpdb;
$subcatergories = $wpdb->get_results("SELECT subcatergories, subcatergories_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY subcatergories");
$html = '<option value="">Select a subcatergories</option>';
foreach ($subcatergories as $k => $v) {
if (trim($v->subcatergories) != "") {
$selected = (strip_tags($_GET['subcatergories_id'])==$v->subcatergories_id) ? ' selected="selected"' : '';
$html .= '<option value="'.$v->subcatergories_id.'"'.$selected.'>'.$v->subcatergories.'</option>';
}
}
return $html;
}

I have no idea if it's that simple or not.
Thanks
Marc
  #5  
Old January 5th, 2015, 08:55 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

To change the width of your drop down menus, try adding the following code to your Custom CSS (instructions):

Code:
div#widget_drop_down_view select { width: 200px; }
What you are going for is a faceted search (or layered navigation). This is not really possible with our Factory product. However it is possible with our WooCommerce plugin. You can learn more about our WooCommerce plugin here: http://www.datafeedr.com/wc

You can also learn about the difference between our Factory product and our WooCommerce plugin here: http://www.datafeedr.com/datafeedr-f...erce-importer/

Eric
  #6  
Old January 6th, 2015, 05:27 PM
marckes1 marckes1 is offline
 
Join Date: Nov 2014
Posts: 14
Default

Hi Eric,
Thanks for the reply. That would have been a great filter for me, so there's no way it could be done? My expertly crafted code rewrite wouldn't work?

With the drop down search menu, I can't do a search from the sites home page. I can select brands and merchants it does the search but stays on the site home page. I can only search from the store home page.

If I do a search and the product is not in that store it says there are no products in the store and the menus freeze. Not a big deal for me, as I just go back to the previous page to get the menus to work, but it could be frustrating for a user.
Here's an example for you:
Store Home_Brand-1 Sol_Merchant-Onsport
Brand-Oakley_Merchant-Oakley(no results, but I have these products in the store)

It looks like there's pros and cons for both options. I read somewhere you can't just transfer your factory site over to API, you have to re-do everything?

Thanks for your help and great support service.
  #7  
Old January 7th, 2015, 09:27 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

What you are trying to do is set up filters. Filters are to be used on pages with products. If there are no products on a page (ie. your homepage) there's nothing to filter because there are no products on that page.

You should configure your merchant and brand filter to only appear on your shop pages with a plugin like Widget Context (or similar).

The brand and merchant filter does work on pages which contain multiple products. For example, here's a search I did using your drop down menus to get all Twinlab products from Amazon: http://www.bodybuildingandfitnesslab...rchant_id=7777

If the search is not working it's because the brand column for the product was not filled in by the merchant in their data feed. This might be the case for your Oakley products.

You are correct, you can't transfer a Factory site over to the API.

Eric
  #8  
Old January 8th, 2015, 09:51 AM
marckes1 marckes1 is offline
 
Join Date: Nov 2014
Posts: 14
Default

Hi Eric,

Thanks, the plug in did the trick. Thanks for all your help.

Marc
 


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
Creating a Sub-Category Advanced Filter as a Dropdown Menu urbaniteuk Questions 11 July 19th, 2013 11:04 AM
Create a Dropdown Menu for Custom Filters urbaniteuk Questions 23 May 17th, 2013 02:37 AM
Slide show of featured products peterscribner Feature Requests 0 October 18th, 2011 11:31 AM
slide show thomascarrier Questions 3 September 29th, 2011 03:10 PM
Dropdown Filters Code feri Questions 4 March 6th, 2011 05:32 PM


All times are GMT -5. The time now is 07:50 PM.


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