D
D
DIAMONDMAN2019-01-19 14:31:18
WooCommerce
DIAMONDMAN, 2019-01-19 14:31:18

How to quickly raise an online store on WooCommerce?

Hello.
A friend asked to quickly raise the store for cheap. I already made up all the pages yesterday. I tried to deal with woocommerce, but there hell is going on in scripts and I don’t know how to approach creating my own theme.
How can I create my own theme and integrate this plugin into it normally? I tried to generate a template using underscores, but nothing worthwhile happens. Googled a lot, couldn't find anything. I had no experience with wordpress before.
Maybe there are some other options for the rapid development of a small online store?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Orkhan Hasanli, 2019-01-19
@DIAMONDMAN

Hello!
As I understand it, you already have a layout. It remains to start creating a theme, and then adapt it to Woocommerce.
https://codex.wordpress.org/Theme_Development
Create a theme -
create a style.css file and add:

/*   
Theme Name: MyTheme
Theme URI: mytheme.loc
Description: Individual WP Theme
Author: AuthorName
Author URI: mytheme.loc
Version: 1.0
*/

Make your edits...
Create a functions.php file and include all scripts, styles and fonts via code. For example,
// подключаем стили и скрипты
function register_styles_scripts() {
  //стили
  wp_enqueue_style('customCSS', get_template_directory_uri() .
    '/custom.css');
  
  //скрипты
  wp_enqueue_script('jquery', get_template_directory_uri() .
    '.js/script.js');
}
add_action('wp_enqueue_scripts', 'register_styles_scripts');

Create the required set of PHP files (index.php, header.php, footer.php, page.php, single.php, archive.php). Depending on what pages you need...
https://developer.wordpress.org/themes/basics/temp...
Create a menu in functions.php For example:
and display the menu via - wp_nav_menu()
https://wp-kama .ru/function/register_nav_menu
https://wp-kama.ru/function/wp_nav_menu
Enable support for thumbnails for entries -
Follow the templates:
- вставляем <?php wp_head(); ?> перед </head>
- вставляем <?php wp_footer(); ?> перед </body>
- Копируем header вырезаем и вставляем в header.php
- Взамен добавляем код <?php get_header(); ?>
- Копируем sidebar вырезаем и вставляем в sidebar.php
- Взамен добавляем код <?php get_sidebar(); ?>
- Копируем footer вырезаем и вставляем в footer.php
- Взамен добавляем код <?php get_footer(); ?>
- в index.php изменяем url изображений на <?php bloginfo('template_url'); ?>/
- вставляем между <title><?php bloginfo('name');?> | <?php wp_title(); ?></title>

Add a VI loop to your templates:
<?php if (have_posts()) :  while (have_posts()) : the_post(); ?>

<?php the_content (); ?>

<?php endwhile; ?>
<?php endif; ?>

After that, you can begin to adapt the voicemeter.
For the correct application of wokomer styles, you need to add body_class() to the body tag
https://wp-kama.ru/function/body_class
Next, install the Woocommerce plugin. The plugin folder contains a templates folder. Copy it to your theme directory and rename it to woocommerce
The wooclock loop is different from the standard WP loop. Details:
https://docs.woocommerce.com/document/third-party-...
Wocomer templates work using hooks. Use them for customization.
https://docs.woocommerce.com/document/introduction...

V
Vladislav Linnik, 2019-02-27
@VladikLinnik

https://ru.wordpress.org/plugins/premmerce - good plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question