Commit da0a5713 authored by jsacksick's avatar jsacksick Committed by Jonathan Sacksick

Add the Commerce Guys Marketplace module.

Change-Id: I0863161d784b895187c53d889b50bd24c5351374
Reviewed-on: https://code.drupalcommerce.org/680Tested-by: 's avatarJenkinsCG <jenkins@drupalcommerce.org>
Reviewed-by: 's avatarJonathan Sacksick <jonathan.sacksick@gmail.com>
parent c3602fc0
......@@ -81,6 +81,7 @@ dependencies[] = commerce_backoffice_product
dependencies[] = commerce_backoffice_order
dependencies[] = commerce_backoffice_content
dependencies[] = commerce_checkout_progress
dependencies[] = commerceguys_marketplace
dependencies[] = commerce_hosted_pci
dependencies[] = menu_attributes
dependencies[] = fences
......@@ -109,7 +110,6 @@ dependencies[] = commerce_kickstart_order
dependencies[] = commerce_kickstart_payment
dependencies[] = commerce_kickstart_comment
dependencies[] = commerce_kickstart_migrate
dependencies[] = commerce_kickstart_service_provider
dependencies[] = commerce_kickstart_dfp
; System Requirements.
......
......@@ -1090,3 +1090,12 @@ function commerce_kickstart_update_7213() {
theme_disable(array('shiny'));
}
}
/**
* Enable the Commerce Guys Marketplace module.
*/
function commerce_kickstart_update_7214() {
_commerce_kickstart_disable_modules('commerce_kickstart_checkout_redirect');
module_enable(array('commerceguys_marketplace'));
menu_rebuild();
}
......@@ -72,6 +72,7 @@ projects[commerce_paypal][version] = 2.0-beta1
projects[commerce_backoffice][subdir] = "contrib"
projects[commerce_backoffice][version] = 1.2
projects[commerce_backoffice][patch][] = "http://drupal.org/files/commerce_backoffice_product-add-product-variations-view-1954150-4.patch"
projects[commerce_backoffice][patch][] = "http://drupal.org/files/backoffice_order_template_for_admin_order_page-1847008-2.patch"
projects[commerce_message][subdir] = "contrib"
projects[commerce_message][version] = 1.0-rc1
projects[commerce_search_api][subdir] = "contrib"
......@@ -90,6 +91,8 @@ projects[commerce_authnet][subdir] = "contrib"
projects[commerce_authnet][version] = 1.1
projects[commerce_exactor][subdir] = "contrib"
projects[commerce_exactor][version] = 1.0-rc1
projects[commerceguys_marketplace][version] = 1.0-beta1
projects[commerceguys_marketplace][subdir] = "contrib"
; Other contribs.
projects[remote_stream_wrapper][version] = 1.0-beta4
......@@ -194,8 +197,7 @@ projects[lingotek][subdir] = "contrib"
; Base theme.
projects[omega][version] = 3.1
projects[omega_kickstart][version] = 3.1
projects[omega_kickstart][patch][] = http://drupal.org/files/omega_kickstart-fix-template-menu-show-gap-1932472-4.patch
projects[omega_kickstart][version] = 3.2
projects[shiny][version] = 1.2
; Libraries.
......
......@@ -3,4 +3,3 @@ description = Provides in-distribution help for Commerce Kickstart.
core = 7.x
package = Commerce Kickstart
dependencies[] = advanced_help
dependencies[] = commerce_kickstart_service_provider
......@@ -48,14 +48,6 @@ function commerce_kickstart_help_menu_alter(&$items) {
$items['admin/index']['type'] = MENU_CALLBACK;
}
/**
* Implements hook_advanced_help_topic_alter().
*/
function commerce_kickstart_help_advanced_help_topic_alter(&$output, $popup) {
$output = str_replace('[%services-teaser%]', commerce_kickstart_service_provider_get_teaser(), $output);
$output = str_replace('[%services-link%]', url('admin/modules/service-providers'), $output);
}
function _commerce_kickstart_help_store() {
drupal_set_breadcrumb(array(l(t('Home'), '<front>'), l(t('Help'), 'admin/advanced_help')));
......@@ -220,7 +212,6 @@ function _commerce_kickstart_help_store() {
$form['prices_payments_taxes']['payment_ethods']['content'] = array(
'#type' => 'item',
'#markup' => '<p>There are payment gateways and there are service providers that have partnered with Commerce Guys. There are 50+ payment providers that have been integrated with Drupal Commerce in the last year. Out of the box we have provided an example payment method to show what is possible.</p>
<a href="/admin/modules/service-providers">Go to the Service Providers</a>
<a href="/admin/commerce/config/payment-methods">Go to the Payment Methods</a>
<a href="http://www.drupalcommerce.org/commerce-kickstart-2/how-download-and-setup-payment-method">Learn more about Payment Methods</a>',
);
......
......@@ -79,18 +79,6 @@
</ul>
</div>
</div>
<div class="first-steps-blocks first-steps-services clearfix">
<h2>Service providers</h2>
<div class="first-steps-blocks-inner">
<p>Kickstart comes with a number of services provided through
Commerce guys partners:</p>
[%services-teaser%]
<div class='all-services-link'><a href='[%services-link%]'>View all services</a></div>
</div>
</div>
<div class="first-steps-blocks first-steps-mode clearfix">
<h2>Kickstart Mode</h2>
......
......@@ -410,6 +410,15 @@ function commerce_kickstart_menus_menu_alter(&$items) {
'toolbar_css' => 'lingotek',
);
}
if (isset($items['commerceguys-marketplace'])) {
$items['commerceguys-marketplace']['title'] = 'Marketplace';
$items['commerceguys-marketplace']['parent'] = 'admin';
$items['commerceguys-marketplace']['weight'] = 49;
$items['commerceguys-marketplace']['options'] = array(
'toolbar_break' => TRUE,
'toolbar_css' => 'marketplace',
);
}
}
/**
......
<?php
/**
* @file
* Documentation for Commerce kickstart servive poroviders.
*/
/**
* Allow to other module display their services in the getting started page.
*
* @return array
* - 'service-module-name' array
* - 'logo_path': The location of the logo.
* - 'title': The human readable service title.
* - 'category': The category the service belong to.
* - 'teaser': A short text about the service. This will be shown in the
* getting started page.
* - 'description': Full description about the service.
* - 'requirements': Requirements for the module.
* - 'link': Link to the service.
* - 'installation_proccess': List of steps needed to be done for implementation
* of the service.
* - 'weight': The weight of the service. The service list is ordered by this
* property in a ascending order.
* - 'requirements_callback': Callback function for the service requirements
* status.
*/
function hook_commerce_kickstart_service_provider() {
return array(
'name' => array(
'logo_path' => '',
'title' => '',
'module_path' => '',
'category' => '',
'teaser' => '',
'description' => '',
'requirements' => '',
'link' => '',
'installation_proccess' => '',
'weight' => 1,
'requirements_callback' => '',
),
);
}
/**
* Allow other modules to alter the services variables before rendering.
*/
function hook_commerce_kickstart_service_provider_alter(&$variable) {
}
name = Commerce Kickstart Service Provider
description = Provides information about Kickstart service providers.
core = 7.x
package = Commerce Kickstart
php = 5.2.4
.provider-wrapper div.first {
float: right;
padding-left: 15px;
padding-right: 0; }
.all-services-link {
text-align: left;
padding-left: 15px;
padding-right: 0; }
.services-page .top-wrapper .first {
float: right; }
.services-page .top-wrapper .last {
float: left; }
.services-wrapper .services .provider-row-wrappepr div.first,
.services-wrapper .services .provider-row-wrappepr div.second {
float: right;
margin-left: 0;
margin-right: 30px; }
.services-wrapper .services .provider-row-wrappepr div.second .top-wrapper .service-title {
float: right; }
.services-wrapper .services .provider-row-wrappepr div.second .top-wrapper .service-type {
float: left; }
.provider-wrapper {
div.first {
float: right;
padding-left: 15px;
padding-right: 0;
}
}
.all-services-link {
text-align: left;
padding-left: 15px;
padding-right: 0;
}
.services-page {
.top-wrapper {
.first {
float: right;
}
.last {
float: left;
}
}
}
.services-wrapper {
.services {
.provider-row-wrappepr {
div.first,
div.second {
float: right;
margin-left: 0;
margin-right: 30px;
}
div.second {
.top-wrapper {
.service-title {
float: right;
}
.service-type {
float: left;
}
}
}
}
}
}
.services-not-found {
font-weight: bold;
text-align: center;
display: block; }
.provider-wrapper {
border-bottom: #cccccc solid 1px;
font-size: 13px;
line-height: 17px;
padding-top: 10px;
padding-bottom: 10px; }
.provider-wrapper div.first {
float: left;
padding-right: 15px; }
.provider-wrapper div.second .service-title {
padding-bottom: 5px; }
.all-services-link {
text-align: right;
padding-bottom: 10px;
padding-right: 15px; }
.services-page .top-wrapper {
padding-bottom: 15px; }
.services-page .top-wrapper .first {
float: left;
margin-top: 3px;
color: #414141;
font-size: 13px;
font-weight: bold; }
.services-page .top-wrapper .last {
float: right; }
.services-page .top-wrapper .last .form-item {
margin: 0; }
.services-page .top-wrapper .last .form-item input {
color: #a8a8a8;
font-size: 12px; }
.services-wrapper {
border: solid 1px #cccccc; }
.services-wrapper .title {
text-transform: uppercase;
background: #CCC; }
.services-wrapper .services .provider-row-wrappepr {
padding-top: 15px;
position: relative; }
.services-wrapper .services .provider-row-wrappepr.odd {
background: white; }
.services-wrapper .services .provider-row-wrappepr.even {
background: #f4f3ee; }
.services-wrapper .services .provider-row-wrappepr .anchor {
display: block;
position: absolute;
top: -60px; }
.services-wrapper .services .provider-row-wrappepr div.first,
.services-wrapper .services .provider-row-wrappepr div.second {
float: left;
margin-left: 33px; }
.services-wrapper .services .provider-row-wrappepr div.first {
width: 10%;
line-height: 15px; }
.services-wrapper .services .provider-row-wrappepr div.first .service-logo img {
border-bottom: 1px solid #cccccc;
padding-bottom: 10px; }
.services-wrapper .services .provider-row-wrappepr div.first .status {
background: none;
font-size: 13px;
margin-top: 10px;
font-weight: bold; }
.services-wrapper .services .provider-row-wrappepr div.first .status .not-exists {
color: #9d4e53; }
.services-wrapper .services .provider-row-wrappepr div.first .status .not-installed {
color: #dc2431; }
.services-wrapper .services .provider-row-wrappepr div.first .status .requires-config {
color: #d67f32; }
.services-wrapper .services .provider-row-wrappepr div.first .status .installed-defined {
color: #44800a; }
.services-wrapper .services .provider-row-wrappepr div.first .requirements {
margin-top: 10px;
color: #9f9f9f;
font-size: 12px; }
.services-wrapper .services .provider-row-wrappepr div.second {
display: block;
width: 82%; }
.services-wrapper .services .provider-row-wrappepr div.second .top-wrapper .service-title {
float: left;
color: #2588c6;
font-weight: bold;
font-size: 15px; }
.services-wrapper .services .provider-row-wrappepr div.second .top-wrapper .service-type {
float: right;
font-weight: bold;
font-size: 15px; }
.services-wrapper .services .provider-row-wrappepr div.second .body-wrapper {
color: #414141;
font-size: 14px; }
.services-not-found {
font-weight: bold;
text-align: center;
display: block;
}
.provider-wrapper {
border-bottom: #CCC solid 1px;
font-size: 13px;
line-height: 17px;
padding-top: 10px;
padding-bottom: 10px;
div.first {
float: left; // LTR
padding-right: 15px;
}
div.second {
.service-title {
padding-bottom: 5px;
}
}
}
.all-services-link {
text-align: right; // LTR
padding-bottom: 10px;
padding-right: 15px;
}
.services-page {
.top-wrapper {
padding-bottom: 15px;
.first {
float: left; // LTR
margin-top: 3px;
color: #414141;
font-size: 13px;
font-weight: bold;
}
.last {
float: right; // LTR
}
.last {
.form-item {
margin: 0;
input {
color: #a8a8a8;
font-size: 12px;
}
}
}
}
}
.services-wrapper {
border: solid 1px #CCC;
.title {
text-transform: uppercase;
background: #CCC;
}
.services {
.provider-row-wrappepr {
padding-top: 15px;
position: relative;
&.odd {
background: white;
}
&.even {
background: #f4f3ee;
}
// Commerce Kickstart menu toolbar is positioned just above the text
// with a normal anchor. Positioning the anchor 60px above the title of
// the service will throw us to the extact location of the service title.
.anchor {
display: block;
position: absolute;
top: -60px;
}
div.first,
div.second {
float: left; // LTR
margin-left: 33px;
}
div.first {
width: 10%;
line-height: 15px;
.service-logo img {
border-bottom: 1px solid #CCC;
padding-bottom: 10px;
}
.status {
background: none;
font-size: 13px;
margin-top: 10px;
font-weight: bold;
.not-exists {
color: #9d4e53;
}
.not-installed {
color: #dc2431;
}
.requires-config {
color: #d67f32;
}
.installed-defined {
color: #44800a;
}
}
.requirements {
margin-top: 10px;
color: #9f9f9f;
font-size: 12px;
}
}
div.second {
display: block;
width: 82%;
.top-wrapper {
.service-title {
float: left; // LTR
color: #2588c6;
font-weight: bold;
font-size: 15px;
}
.service-type {
float: right; // LTR
font-weight: bold;
font-size: 15px;
}
}
.body-wrapper {
color: #414141;
font-size: 14px;
}
}
}
}
}
/**
* @file
* JS events handling for Commerce Kickstart service provider module.
*/
(function($) {
Drupal.behaviors.filterServices = {
attach: function() {
// Handling focus in and out on the search box.
var search_box = $("#edit-text");
var default_value = search_box.val();
search_box.focus(function() {
if (search_box.val() == default_value) {
$(this).val('');
}
});
search_box.focusout(function() {
if (search_box.val() == '') {
$(this).val(default_value);
}
});
// Filtering the not matched text.
search_box.keydown(function(event) {
// Disabling enter key.
if (event.which == 13) {
event.preventDefault();
}
var keyword = $(this).val().toLowerCase();
// Show and hide elements that contain the text.
$(".provider-row-wrappepr .row-wrapper .second").each(function(index) {
var parent = $(this).parents('.provider-row-wrappepr');
if ($(this).text().toLowerCase().indexOf(keyword) !== -1) {
parent.show();
}
else {
parent.hide();
}
});
// After hiding them, add odd/even class for zebra effect.
$(".provider-row-wrappepr .row-wrapper .second:visible").each(function(index) {
var parent = $(this).parents('.provider-row-wrappepr');
if (index % 2 == 0) {
parent.removeClass('even');
parent.addClass('odd');
}
else {
parent.removeClass('odd');
parent.addClass('even');
}
});
});
}
}
})(jQuery);
<div class="provider-row-wrappepr <?php print $name; ?> <?php print $zebra; ?> clearfix">
<a class="anchor" name="<?php print $name; ?>"></a>
<div class="row-wrapper">
<div class="first">
<div class="service-logo"><?php print $logo; ?></div>
<div class="status"><span class="<?php print $status_class; ?>"><?php print $status_text; ?></span></div>
<?php if ($requirements): ?>
<div class="requirements">
<?php print $requirements; ?>
</div>
<?php endif; ?>
</div>
<div class="second">
<div class="top-wrapper clearfix">
<div class="service-title"><?php print $title; ?></div>
<div class="service-type"><?php print $type; ?></div>
</div>
<div class="body-wrapper">
<p class="body"><?php print $description; ?></p>
<h4 class="installation-title">
<?php print $installation_label; ?>
</h4>
<p class="installation-body">
<?php print $installation; ?>
</p>
</div>
</div>
</div>
</div>
<div class="services-page">
<div class="top-wrapper clearfix">
<div class="first"><?php print $page_title; ?></div>
<div class="last"><?php print $search; ?></div>
</div>
<div class="services-wrapper">
<div class="title"><?php print t('Title'); ?></div>
<div class="services">
<?php print $services; ?>
</div>
</div>
</div>
<div class="provider-wrapper <?php print $name; ?> clearfix">
<div class='first'>
<div class="service-logo"><?php print $logo; ?></div>
<div class="service-type"><?php print $type; ?></div>
<div class="service-link"><?php print $link; ?></div>
</div>