How to use hooks for overriding homepage content in cs cart - php

I am new to cs-cart and I am trying to use hooks in cs-cart.
I had gone through some cs-cart website but not getting proper answer.
I want to override homepage content but not the banner with new content then how can i do it using hooks.

Homepage doesn't have any content at all, there are only blocks that can be managed from Homepage layout:
1
2

More details about the hooks can be found in the following documentation:
http://docs.cs-cart.com/4.3.x/addons/hooking/tpl_hooks.html
Here are also several articles where you can learn how to use blocks to customize your Home page in the required way:
http://kb.cs-cart.com/blocks
http://www.cs-cart.com/documentation/reference_guide/index.htmld?design_block_manager_blocks.htm

If you remove all blocks in layout > homepage then everything will be removed except for block which are in Default.
If you want to override homepage data then remove all blocks in homepage layout and add you own block.
See image below for more clear picture how to add your own block.
Please note you cannot override homepage but you can modify according to you.

Related

Edit the Wordpress sidebar with personalized content

I am creating a plugin for Wordpress. I'm in doubt which hook I need to call to add custom content to the Wordpress side menu bar.
I want to add a widget with a chart over there.
I already researched, but I didn't find anything about it. It would be better if I didn't need to change the files in the sidebar but rather do everything for my plugin.
You're looking for two functions add_menu_page and add_submenu_page
Detailed instructions are here:
https://developer.wordpress.org/reference/functions/add_menu_page/
https://developer.wordpress.org/reference/functions/add_submenu_page/

PHP Woocommerce Flatsome theme - Remove breadcrumb from shop page title

1) I'm trying to remove the breacrumb from page-title div using php instead of display:none but i can't manage to found the good hook, i check in many different php files etc but anyway i'm not good enough in PHP. I'm like zero.
2) I also want to display the breadcrumb into the footer. I manage to found a way to add it into the footer already using simply
add_action( 'flatsome_footer', 'flatsome_breadcrumb', 10 );
But i did not found the hook to put it into their "footer-1" that is a child div of the footer block. This flatsome_footer is the parent div and it will make me add more css for it.
Here is the documentation of the flatsome theme (Actions & Filters), it may can help (i try many different as i say & open php files but cant manage to remove it by remove_action maybe i have to add filters idk... i'm just bad.
https://docs.uxthemes.com/article/385-hooks#flatsome_footer
All i know is that their page title block is using (shop-page-title category-page-title page-title) css class.
Thank you very much for helping.
If you want remove breadcrumb from shop or product page, you should findout hook from below files and comment that code.
Category Page File: yourthemepath/woocommerce/layouts/headers/category-title.php
Please check https://docs.uxthemes.com/article/385-hooks#flatsome_category_title
Product Page: https://docs.uxthemes.com/article/385-hooks#flatsome_product_title

Add <?php the_content(); ?> to WooCommerce page template

I use Elementor page builder on my WordPress site. There is a problem with it - by default it doesn't allow editing WooCoomerce Shop/Products pages. The solution they say is to add to page templates code. I, being a beginner with no idea of coding, cannot figure out which file to add this code to and where in that file. I have been researching and trying to fix this myself for two weeks now, in vain. Please help me achieve this.
Here's what Elementor say: "Sorry, the content area was not found in your page. You must call the_content function in the current template, in order for Elementor to work on this page."
Go to Elementor setting and then check products in post types
Go to Products, click Edit on the product you want to edit, input something (ie. a full stop-sign '.') in the WP Editor, click Update. (See attached screenshot.)
Screenshot
There seems to be a misconception that Elementor can be used to "edit" any content.
For Elementor to work on a "Page" i.e. the post type that uses either the page.php or any theme declared page templates it requires the_content(); function to present in the code.
Issue #1: WooCommerce uses the woocommerce_content(); function to return the content of the shop.
Issue #2: The Shop output does not use the "Page" or Custom Page template - the output is equivalent to the index.php or home.php, neither of which are editable via Elementor.
Unless you are willing to write a pretty sophisticated function to collect all those elements' data and filter them into the_content(); function, there is currently no way of editing such content directly.
I know it's not the solution you are looking for but that is the current state of affairs. Having said that, some of us are working on all sorts of solutions and maybe, just maybe - we'll come up with a way to have this option available soon ;)
For shop page you should go to Elementor setting and then check products in post types.
Because shop page products are not the content but posts it's the solution.
So inlcude products in post types and edit with elmentor, if for some reason you can't see 'edit with elementor' under shop page, then just open shop page and add
/?elementor and it would enable elementor
NO need to add this code in any page follow these instruction.
You just need to clear cache and cookies your browser, Some time website take previous data to show the web page and give this error.
or
if you open your website private mode then login and go to the page by Elementor you will never face this problem.

How to make Wordpress Custom page

i m a newbie to wordpress. I have started theme development and encountered these problems. I think these kind of problem does have a solution, but i m not able to find it out.
I m trying to make a custom page. Uptill now i have made header, footer and main index page.
I see that whenever my theme is activated, I see these default index page, with header and footer assign to it.
I have also made some cutom about us , contact us pages using the Add Pages Functionality of wordpress.
My Problem:
1.Now I m trying to make custom product page where I will have more than 100 images on that pages, and then i can change the images, add the images and description and the link url in future. I have made some html code and put it in the text Tab . I can also see the images on the frontend of the Custom page. But my template breaks. Images goes up and description goes far below.
Also i wanted to add fancybox to all the images which are goin to be replaced or added. But again my template breaks.
So can we make custom.php page and do some coding or anything which you feel is the right way of doing it, Please let me know.
Firstly create product.php page in templates folder using below code on top
<?php
/*
Template Name: My Product Page
*/
get_header();
// write your code here
get_footer();
Then, assign the above template to the page in admin.
Then, that page you can call in menu.
For more detail, check here :- http://codex.wordpress.org/Page_Templates
Actually you don't really need to create a custom template for this unless if you are planing to use that same template on another page.
If your page name is products , just create a file called page-products.php in your theme root. and write your code inside that page.
If your planing to develop themes first be comfirtable with wp template hierarchy.
http://codex.wordpress.org/Template_Hierarchy

Wordpress - creating custom pages with php code

I need to add few additional pages to my wordpress site.
These pages should not be "part of the site", ie they should not be linked somewhere from the posts and so on.
However, they should have the same header/footer as the rest of the site ( I am using custom theme ). And they should be accessible via url.
The final requirement is, I should be able to code in php.
At the moment, I tried to create a new "Page" in my admin console. And then write some php-code inside. However, all my php code gets commented and since not executed.
I don't think that installing plugins such as Exec-PHP is a good idea, so I am trying to find other solutions.
Any comments/advice/suggestions how to make it?
I would be grateful if you give me some how-to link.
Thank you in advance.
You can use a custom page template in your theme for this and just keep the site empty in the admin panel:
http://codex.wordpress.org/Theme_Development#Custom_Page_Templates
By using Template tag's you can create custom page.
write this code on the top of your php file....
/*
Template Name: Your Template Name
*/

Categories