Skip to content

Instantly share code, notes, and snippets.

View garciademarina's full-sized avatar

Carlos Garcia de Marina garciademarina

View GitHub Profile
@garciademarina
garciademarina / graceful.go
Created October 1, 2018 06:17 — forked from peterhellberg/graceful.go
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
@garciademarina
garciademarina / item-post.php
Created June 13, 2018 06:50
you only need to replace item-post.php file at oc-content/themes/gum/item-post.php
<?php
// meta tag robots
osc_add_hook('header','gum_nofollow_construct');
osc_enqueue_script('jquery-validate');
osc_enqueue_script('jquery-fineuploader');
osc_enqueue_style('jquery-ui', osc_current_web_theme_url() . 'lib/jquery-ui/jquery-ui.css');
gum_body_class();
$action = 'item_add_post';
@garciademarina
garciademarina / payfromwallet.php
Created October 13, 2017 10:29
payment_pro/user/payfromwallet.php
<?php
ob_get_clean();
if(!osc_is_web_user_logged_in()) {
osc_add_flash_error_message(__('You need to login to be able to pay with your credits', 'payment_pro'));
osc_redirect_to(osc_route_url('payment-pro-checkout'));
die;
}
@garciademarina
garciademarina / checkout.php
Created October 13, 2017 10:28
payment_pro/user/checkout.php
<?php
require_once PAYMENT_PRO_PATH . 'CheckoutDataTable.php';
$products = payment_pro_cart_get();
$extra = osc_apply_filter('payment_pro_checkout_extra', array('user' => osc_logged_user_id(), 'email' => osc_logged_user_email()));;
$checkoutDataTable = new CheckoutDataTable();
$checkoutDataTable->table($products);
$aData = $checkoutDataTable->getData();
@garciademarina
garciademarina / readme.md
Created October 13, 2017 08:30
tatiana theme - osclass payments pro

Edit the following files:

main.php line 200

<tr class="<?php echo $class; ?>" onclick="location.href='<?php echo osc_item_url();?>';">

to:

@garciademarina
garciademarina / style.css
Last active September 20, 2017 06:55
realos theme - radius search plugin fix responsive - oc-content/themes/realos/style.css
.radius_search_remove, .radius_search_address {
margin: 1em 0;
}
@garciademarina
garciademarina / style.css
Created September 20, 2017 06:54
oc-content/themes/realos/style.css
.radius_search_remove, .radius_search_address {
margin: 1em 0;
}

In file oc-content/themes/gum/class/payments_pro/user/menu.php line 91

Change from :

printf('<li><a class="searchPaginationSelected" href="%s">%d</a>'</li>, osc_route_url('payment-pro-user-menu-page', array('iPage' => $i)), ($i + 1));

to

@garciademarina
garciademarina / gist:8875f972bd1de44f45871b6ddc91e288
Last active January 11, 2017 08:44
Edit file oc-content/themes/gum/class/GumRegister.php < line 28 >
// from THIS
if(Params::getParam('s_email')!=Params::getParam('s_email_2')) {
// to THIS
if(isset($_REQUEST['s_email_2']) && Params::getParam('s_email')!=Params::getParam('s_email_2')) {
@garciademarina
garciademarina / item.php
Created December 7, 2016 11:28
around line 88 of file gum/item.php
// around line 88, gum/item.php
<?php if(osc_user_phone()!='') : ?>
<i class="fa fa-phone-square"></i> <span class="phone phone_hide"><?php echo osc_user_phone(); ?></span>
<span class="pull-right"><a class="btn btn-default btn-arrow-left" onclick="reveal_phone($(this));" href="#"><?php _e('Reveal', 'gum'); ?></a></span>
<?php endif; ?>
// replace the if statement by :
<?php if(osc_user_phone()!='' && osc_reg_user_can_contact() && !osc_is_web_user_logged_in() ) : ?>