Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Products on part of the home page (/showthread.php?t=9594)

diabolique September 18th, 2013 07:19 AM

Products on part of the home page
 
Hi Eric,
This is our new theme: http://themes.tielabs.com/?theme=jarida
If you scroll to the bottom, you will see a scrolling box and a banner ad going across the page horizontally. In theory, the theme allows me to input HTML code into these sections if I want to place an ad in there, but these sections are not really widgetized in the same way that the sidebar is. Is it possible for me to put some store products in there instead of just in the sidebar? I want 2 rows of store products going across the page horizontally.
Thank you.

Eric September 18th, 2013 08:03 AM

Hi,

I'm not sure how you would integrate products into the horizontal scrolling area at the bottom of the page.

If you know the proper HTML markup, then you simply need to create a new Custom View in the Factory, add a Product list module to the view and then add the necessary HTML to structure the data.

However if it's generated via JavaScript, it might be even trickier.

Eric

diabolique September 18th, 2013 08:37 AM

That's the problem. I don't know the proper HTML markup. I thought you would help me with that. In the sidebar, the markup is created by your widget, right? So, how would I know it?

Eric September 18th, 2013 08:46 AM

Hi,

The proper HTML is dictated by your theme, not by Datafeedr. That is the problem, I don't know what the proper HTML markup is for the slider section at the bottom of that theme.

But the thing to know besides knowing the HTML required is how to embed store elements into your theme when a widget is not available. In this case you will use shortcodes.

Here are some examples of shortcodes: http://www.datafeedr.com/docs/item/185

You will need to use the PHP version (at the bottom of the page) and embed the PHP code into your theme's template file in the right place. I'm not sure what the right place is because that is completely dependent on your theme.

So basically, you will create a new Custom View or Widget, add a Product list module to the view, add the required HTML to format the slider as your theme requires and then using the shortcodes embed that widget into your template file.

Eric

diabolique September 18th, 2013 10:40 AM

OK, so I created a widget. Now, I have to add the correct PHP tag into my HTML input field? So if I use this shortcode: <?php echo datafeedr_tag('widget/my-custom-widget'); ?>
I assume I have to insert the name of my widget into it? What is the name of my new Widget?

Eric September 18th, 2013 11:05 AM

Hi,

Now you can access the widget via a shortcode in your templates like this:

PHP Code:

<?php echo datafeedr_tag('widget/home-page-bottom'); ?>

Eric

diabolique September 18th, 2013 12:16 PM

That did not work. Nothing appeared. I have a feeling it wants just straight HTML.

Eric September 18th, 2013 12:27 PM

Hi,

It worked for me. I imported your store into my test site and placed <?php echo datafeedr_tag('widget/home-page-bottom'); ?> into my theme's footer.php file and it output 10 products right into the footer.

I would make sure you are editing the right file as well as ensure that no caching plugin is running on your site or that your site's cache is cleared after every code change that you make.

Eric

diabolique September 18th, 2013 01:05 PM

Eric,
When you say "footer", you mean the actual footer? I was talking about the Home Page Builder. There is a section in the theme's settings called Home Page Builder. That's what I was talking about.

Eric September 18th, 2013 01:08 PM

Hi,

I was talking about my theme's footer.php file.

However if you are using some type of GUI page builder, you'll need to ask your theme developer how you are able to load PHP into a section of your page.

By default, loading PHP via a GUI page builder is probably going to be disabled for security reasons.

Eric

diabolique September 18th, 2013 01:12 PM

OK, I"m trying to replicate what you're talking about, but without success. Where exactly did you enter that shortcode?

diabolique September 18th, 2013 01:13 PM

Yes, I think that's what's happening. I need to enter the code via GUI. That's why I think it needs to be HTML, not PHP.

Eric September 18th, 2013 02:07 PM

Quote:

Originally Posted by diabolique (Post 44556)
OK, I"m trying to replicate what you're talking about, but without success. Where exactly did you enter that shortcode?

I put it in the theme's footer.php file however our themes are probably very, very different.

Quote:

Originally Posted by diabolique (Post 44557)
Yes, I think that's what's happening. I need to enter the code via GUI. That's why I think it needs to be HTML, not PHP.

I would ask the theme developer how you can get some PHP into your template files.

Eric

diabolique September 18th, 2013 02:51 PM

OK, I'll try

diabolique September 22nd, 2013 08:29 AM

Eric, here is what the developer had to say:

That is not a wordpress shortcode it is a php statements .. theme banners areas supports shortcodes which be something like

to add a php code you need to edit theme php files and add the code manually in it.

Eric September 22nd, 2013 08:42 AM

Hi

That's what I thought. Ask the developer what theme file to edit.

Eric

diabolique September 24th, 2013 09:18 AM

Here is what he says:

edit index.php file in the main theme folder and add the code above
<?php get_footer(); ?>

Eric September 24th, 2013 09:24 AM

Quote:

Originally Posted by diabolique (Post 44608)
Here is what he says:

edit index.php file in the main theme folder and add the code above
<?php get_footer(); ?>

That sounds about right. Did you do that?

diabolique September 24th, 2013 02:56 PM

Yes. I placed the tag: <?php echo datafeedr_tag('widget/home-page-bottom'); ?> just where he said. But nothing happened. No change whatsoever. What am I dong wrong?

Eric September 24th, 2013 03:03 PM

Hi,

I'm sorry but I really can't say why it's not working. I imported your store into my test site, placed this code <?php echo datafeedr_tag('widget/home-page-bottom'); ?> in my theme's footer.php file and it works fine for me...

It's not an issue with Datafeedr. I'm guessing the code is not being inserted into the right place in your index.php file...

Eric

diabolique September 24th, 2013 03:51 PM

You inserted it into footer.php? Why don't you try inserting into index.php, the same way I did, and tell me the result.

Eric September 24th, 2013 03:54 PM

Quote:

Originally Posted by diabolique (Post 44614)
You inserted it into footer.php? Why don't you try inserting into index.php, the same way I did, and tell me the result.

Just tried and it still works...

diabolique September 24th, 2013 07:27 PM

Well, I have to get to the bottom of this. We are talking about index.php under the THEME/Jarida folder, right? Not the main WP index.php?

If it works for you, there must be a reason it doesn't work for me. What else can I try?

Eric September 24th, 2013 07:33 PM

Quote:

Originally Posted by diabolique (Post 44616)
Well, I have to get to the bottom of this. We are talking about index.php under the THEME/Jarida folder, right? Not the main WP index.php?

If it works for you, there must be a reason it doesn't work for me. What else can I try?

I don't really know. I would make sure you've clicked the [Update Products and Settings] button on your site so you are for sure the new view has been added to your site.

Other than that, you might need more guidance from the theme developer you purchased the theme from.

Eric

diabolique September 25th, 2013 01:36 PM

1 Attachment(s)
Eric,
This time it works, but the formatting is all wrong. Instead of a nice row of thumbnails across the bottom, I get one column of giant images. See attached screen grab.
Dima

Eric September 25th, 2013 01:38 PM

Hi Dima,

Great! To fix the formatting, go here: The Factory > Your Store > VIEWS > WIDGETS > Home Page Bottom > View menu > View Properties

Under CSS ID, add the word: view

Save and click the [Update Settings Only] button on your site.

Eric

diabolique September 25th, 2013 02:47 PM

1 Attachment(s)
OK, that's closer, but there are still formatting problems. I really only want one row of 4 products. Plus, the buttons and description are not lining up correctly. Is my theme's CSS interfering with datafeedr? Please see attached screengrab.

Eric September 25th, 2013 02:50 PM

Hi,

If you just want 1 row, you need to set the Products per page to 4 here: The Factory > Your Store > VIEWS > WIDGETS > Home Page Bottom > Product list module > Settings ()

I would also suggest you change the Product list template from the Template 2 code you are using to Template 1. Template 1 (with 4 columns) will format the products nicely on your page.

Eric

diabolique September 25th, 2013 06:05 PM

Eric,
Thanks. That actually works very well: http://diaboliquemagazine.com/
Two questions:
Since the box surrounding each item is so wide, I think I'd like to fit 5 products in there, but when I specify that in (Settings), the fifth product goes on a second row. How can I have 5 products on one row?

Also, if you look at my sidebar, you will see the Advanced Search Widget, but there is no search field. Is that the theme's CSS interfering? What can I do about it?
Thank you for all your help.
D

diabolique September 25th, 2013 06:07 PM

One more question...
Just above the row of products, I need to put a header that says, STORE. Should I just insert the proper HTML tags into index.php manually?

Eric September 25th, 2013 06:28 PM

Hi
Quote:

Originally Posted by diabolique (Post 44632)
Since the box surrounding each item is so wide, I think I'd like to fit 5 products in there, but when I specify that in (Settings), the fifth product goes on a second row. How can I have 5 products on one row?

In your product list module change this:
HTML Code:

<div class="t1 col4">
To this:
HTML Code:

<div class="t1 col5">
Quote:

Originally Posted by diabolique (Post 44632)
Also, if you look at my sidebar, you will see the Advanced Search Widget, but there is no search field. Is that the theme's CSS interfering? What can I do about it?

I don't see that...

Quote:

Originally Posted by diabolique (Post 44633)
One more question...
Just above the row of products, I need to put a header that says, STORE. Should I just insert the proper HTML tags into index.php manually?

Yes, that would be fine to put it there.

Eric

diabolique September 25th, 2013 06:41 PM

1 Attachment(s)
This is what I'm seeing in my sidebar: see attached.

diabolique September 25th, 2013 07:12 PM

1 Attachment(s)
When I change to code <div class="t1 col4"> to <div class="t1 col5">, it creates bad formatting problems with product images. Please see attachment.

Eric September 25th, 2013 07:54 PM

Hi,

The reason your search form fields aren't showing up is because your theme has set them to not show up. You can try adding this to your Custom CSS:

Code:

#wdgt_as input {
border: 1px solid gray;
}

Regarding the images, you could try this Custom CSS:

Code:

#view .col5 .thmb, #view .col5 img {
max-width: 100px;
max-height: 100px;
min-height: 100px;
}

Eric

bombpetite March 19th, 2014 09:17 AM

Embedding Products in to Homepage
 
1 Attachment(s)
Hi Eric,

I think my issue might be related to this thread.

I am trying to embed hand-picked products in to the homepage http://bombpetite.com/ like on the screenshot attached.

But as you can see from the screenshot it doesn't work (even though it works fine on other pages).

What I'm trying to do... I've created a HTML three column grid. Placed it in one of the theme-generated homepage sections. And now want to insert a product into each column of the grid. Then style it to my liking.

Can you please advise?

Thanks,

Eugene

Eric March 19th, 2014 09:21 AM

Hi,

Your theme needs to use the_content() instead of the_excerpt() function when displaying blog info on the front page.

You'll need to edit your theme and make that change. If you're not sure, you should ask the theme developer how to change your front page to show full content instead of the post excerpt.

Eric


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

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