remove image placeholder on woo commerce shop archive page - hook

I have been getting used to hooks for adding and removing content on various woo commerce pages.
However I can't see how to remove the images for each product from the shop archive page.
I understand that removing the featured image for each product will obviously remove the image but there is an image placeholder that remains.
I need to be able to remove the image placeholder so that all that remains is the product title etc...
Any help is much appreciated.
edit.
I managed to sort this out but prehaps not in the most effiecient way so I'll leave my findings here for improvement in case anyone else wanted to do anything similar.
Using hooks in the normal way didn't have a any effect so I edited the main woo commerce template file, which isn't a great idea, but...
Removing...
<?php
/**
* woocommerce_before_shop_loop_item_title hook
*
* #hooked woocommerce_show_product_loop_sale_flash - 10
* #hooked woocommerce_template_loop_product_thumbnail - 10
*/
do_action( 'woocommerce_before_shop_loop_item_title' );
?>
From content-product.php file within the plugin/woocommerce/templates folder had the desired effect.

Don't remove it, you can use remove_action() function. For archives, as content-product.php says, in functions.php you can write:
remove_action(
'woocommerce_before_shop_loop_item_title',
'woocommerce_template_loop_product_thumbnail',
10
);

Related

Edititing main page in Shopware

I´m usind Shopware to create a website ( www.futureindustries.co ) I need to change all of the pictures that are on the main page (the slider). Actually there is first slide blank and then 2 pictures. I need to change the first picture (blank) but I have no idea where to find the style sheet or that piece of code where I ľill put the path to the picture. I mean that I have no idea where to find place where I would change this:
background-image: url("");
To this:
background-image: url("path to the image I want");
I´m using theme "Views"
I know that this may be very irrelevant for most of you (maybe all of you) but I´m really desperate. I feel like I´ve opened every file and i still can´t find it.
To make it clear - I am repairing the website and the programmer that created this site is not responding to anyone so I can´t ask him how to do that.
The content seems exist in database. You can find & edit it from Backend menu > Marketing > Shopping Worlds > Startseite.

How to display modules only on search results in Joomla 2.5?

Hello please read the whole question, this isn't just solved by enabling the modules only for the search page:
I have a few modules that are exclusively shown on the search page in Joomla.
I created a hidden menu entry for the search as well in order to tell modules to only show on this page. This works alright, but when I click one of the results and get redirected to the actual result, then the modules, which should only show up on the search page are still shown in the result page.
Any clue how to fix this? Really annoying as I use 3rd party search enhancing modules, and they are showing on the results.
Using standard Joomla, there's no way to target modules to only the search results page and none of the pages that link off the results – but I know you knew that! The hidden menu item is a help, but does not change the menu item of some of the links off that page. It's all to do with the allocation and use of "Itemids" in Joomla.
To be able to target modules more specifically, you need to use a 3rd-party extension. I developed MetaMod (www.metamodpro.com) to cope with exactly this use case. MetaMod is a wrapper module that can then decide just which other module to include in itself (or not). So you assign the MetaMod to the page, then put a snippet of code inside the MetaMod which decides which other module to include.
In this case, I'd use the following in MetaMod:
if ($core_genius->check("pagetype = search, searchresults")) return XXX;
// replace XXX with the module id of the module to include
// ONLY on the search page, or the searchresults page, but
// no other type of page.
Hope that helps,
Stephen
Although MetaMod is great (I've used it myself & Stephen's support is great!) there is another way to do it without using 3rd party extensions.
You could create new module positions in your template above (or below) the module positions you wanted to use and wrap them in an if statement like so:
<?php if(!isset(JRequest::getString('searchword'))) : ?>
<jdoc:include type="modules" name="right-search" style="xhtml" />
<?php endif; ?>

Pagination [+next+] not working on MODx CMS template

I'm having difficulty getting the pagination functionality working with [[Ditto? ... ]] in MODx CMS.
I have the documents displaying in the page, limit is set to 5. The output from my other pagination template placeholders seem to be working but the [+next+] link doesn't load the next set of 5 documents (going in descending date order).
Here's my template code:
[[Ditto?
&parents=`13`
&tpl=`ArticleListChunk`
&display=`5`
&&removeChunk=`Comments`
&paginate=`1`
&extenders=`summary,dateFilter`
&paginateAlwaysShowLinks=`0`
&dateFormat=`%F %D %Y`
]]
<p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles</p>
<ul class="clearfix">
<li>[+previous+]</li>
<li>Page <strong>[+currentPage+]</strong> of [+totalPages+]</li>
<li>[+next+]</li>
</ul>
The output I get is:
Showing 1 - 5 of 17 Articles
Page 1 of 4
Next >
as you can see the output is correct, however when I click the 'next' link the resulting URL is .../news.html?start=5 but the content of the page stays the same (i.e. the latest 5 documents are shown!).
This is how the template and functionality was when I was inherited this project from a client, and I have never used MODx CMS before -- can anyone help me please?
I there a way to update the SQL offset with a parameter or something? I've been all through the Wiki pages for Ditto / MODx but can't find what I need or what I should be doing that I'm not!
I would think you need to call ditto uncached [[!Ditto? attribs ]]
That's just a guess.
Also it looks like you are using EVO? check the cache syntax, you might need to put an exclamation mark at the end as well. [[!Ditto? attribs !]]
After plenty of searching I found a post on the MODx forum that pointed me in the right direction.
Turns out that caching was enabled in the page/document's settings (doh!). I disabled this and now it works fine!
However I have not set the no-caching token ('!') in Ditto's parameter string which, including the answer from Sean, my research has suggested is advisable and/or required. I've not worked with MODx before so I can't say for certain, but it seems to work without this for me!
Thanks #SeanKimball as your answer set me down the right path.

Pagination With Special Recent Posts Plugin (WordPress)

I am using the 'Special Recent Posts' plug-in in WordPress. It is being used to show header images and excerpts for articles, which you then click through to the full article.
You can set parameters on that plug-in to tell how many recent articles you would like show. Basically what I want to do is show the first five articles on the main page and then have the overflow go to new pages (like an 'older posts' type thing where there would be five posts per page).
Can anyone help me get pointed in the right direction? Every time I Google this question it doesn't quite understand...Thanks.
EDIT:
I saw the first answer and while it is moving in the right direction, it doesn't automatically generate the new pages like I would like. I want to have the overflow of special recent posts generate a new 'previous' page automatically. I understand that I could manually do this but the blog I am working on will be getting updated every day so it would be very time consuming to constantly create new pages as I go along. Can somebody point me in the right direction?
EDIT:
Here is the full code I have on my index.php:
<?php get_header(); ?>
<?php c2c_the_category_image($image_extensions='png gif jpg', $image_dir='/wp-content/images/', $use_name_if_no_image=true, $start_from='begin', $limit=999); ?>
<?php echo do_shortcode("[srp srp_number_post_option='34' srp_thumbnail_option='yes' srp_widget_title_hide_option='yes' srp_post_date_option='no' srp_wdg_excerpt_length='50' srp_wdg_excerpt_length_mode='fullexcerpt']"); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
The plugin has a parameter for this, from the documentation:
//Global Post Offset (to skip an arbitrary number of posts from the beginning)
srp_post_global_offset_option => numeric
So, on the second page, to skip 5 posts and then show the next 5, you would want something like this:
[srp srp_number_post_option='5' srp_post_global_offset_option='5']
Documentation: http://wordpress.org/extend/plugins/special-recent-posts/installation/
EDIT: To answer your question about generating new pages, technically you would not. You would have one page that would show different posts, acting like it was a different page. You would probably need use a query string (URL parameter). But, you can't put direct PHP into a wordpress post, so you need to either modify a PHP file, or get a WordPress plugin like Shortcode Exec PHP, so you can take the page number parameter from the URL and put it into the shortcode for special recent posts.
Example based on your index.php code:
$offset = ($_GET['page'] * 5) - 5;
echo do_shortcode("[srp srp_number_post_option='34' srp_thumbnail_option='yes'
srp_widget_title_hide_option='yes' srp_post_date_option='no'
srp_wdg_excerpt_length='50' srp_wdg_excerpt_length_mode='fullexcerpt'
srp_post_global_offset_option='".$offset."']");
Make your first page use
index.php?page=1
And your "Next Page" link:
$next = $_GET['page'] + 1;
echo 'Next Page';
I never worked before the special recent post plugin. So i would like to give WordPress query post solution.
First, to get recent five post in home page (index.php) use below query parameter.
$query = new WP_Query( 'posts_per_page=5');
Second, to list older post in other page use below query parameter.
$query = new WP_Query( array( 'posts_per_page' => 5, 'offset' => 5 ) );
Above query will get posts from 6 and 5 post per page.To add pagination, add paging parameter.Refer WP_Query
Pagination is now available in the new Special Recent Posts PRO Edition version 3.0.0

display an extrafield over product image with virtuemart when typed by user (something like tshirt designer)

i need to display an extrafield (virtuemart standard attribute) on flypage over the product image.
I need it as a "customization print option" to display what user want to write over product!
I need the field under other extrafield (as it is normally), but let it appear over image only when user write on it! Is it possible?
Or is there some other solution for this?
Here's the example:
I'm using:
Joomla V 1.5.14
Virtuemart V1.1.6
code are welcome, i'm not so expert!
thank you
The first solution that comes to mind is to use Mootools (since VM already loads it) to update a blank div that you position over the top of the image. This is a built in function in Mootools.
http://mootools.net/docs/core/Element/Element#Element%3areplaces

Resources