Интеграция с темой
<?php if(function_exists(‘osc_compare’)) { echo osc_compare(); } ?>
<?php if(function_exists(‘osc_compare’)) { echo osc_compare(); } ?>
https://demo.osclass.su/compare-items
https://demo.osclass.su/my-comparisons
Расширенные функции
<?php echo co_get_compare_count(); ?>
<?php if(co_is_item_in_compare($item_id)) { ?> <p>Item is in compare list</p> <?php } ?>
<?php $compare_items = co_get_compare_items(); ?> <?php print_r($compare_items); ?>
<?php echo co_floating_button(); ?>
<?php while(osc_has_items()) { ?> <div class=»listing-item»> <h3><?php echo osc_item_title(); ?></h3> <?php if(function_exists(‘osc_compare’)) { echo osc_compare(); } ?> </div> <?php } ?>
<?php if(function_exists(‘osc_compare’)) { echo osc_compare(); } ?>
.co_compare_button { background: #your-color; border-radius: 5px; padding: 8px 16px; } .co_compare_button.is_compare { background: #another-color; }
Часто задаваемые вопросы
add_filter(‘co_button_text_add’, function($text) { return ‘My custom text’; });
remove_action(‘footer’, ‘co_add_floating_button’);
Перевод
oc-content/plugins/osclass_compare/languages/
