Направљене поруке на форуму

Посматрање 6 одговора - 1 до 6 (од укупно 6)
  • Форум: Проблеми
    Као одговор на: woocomerce atribute samo za odredjene kategorij
    Thread Starter bakalnicasrbija

    (@bakalnicasrbija)

    u samom pluginu nasao sam kod koji ispisuje sve atribyte prilikom dodavanja proizvoda to je ovaj kod `function wcfm_products_manage_select_attributes( $product_id = 0 ) {
    global $WCFM, $WCFMu, $wc_product_attributes;

    $wcfm_attributes = array();
    if( $product_id ) {
    $wcfm_attributes = get_post_meta( $product_id, ‘_product_attributes’, true );
    }

    $attribute_taxonomies = array(„alkohol“,“voce“);
    $attributes = array();
    $acnt = 0;
    if ( ! empty( $attribute_taxonomies ) ) {
    foreach ( $attribute_taxonomies as $attribute_taxonomy ) {
    $att_taxonomy = wc_attribute_taxonomy_name( $attribute_taxonomy );
    $attributes[$acnt][‘term_name’] = $att_taxonomy;
    $attributes[$acnt][‘name’] = wc_attribute_label( $att_taxonomy );
    $attributes[$acnt][‘attribute_taxonomy’] = $attribute_taxonomy;
    $attributes[$acnt][‘tax_name’] = $att_taxonomy;
    $attributes[$acnt][‘is_taxonomy’] = 1;

    $args = array(
    ‘orderby’ => ‘name’,
    ‘hide_empty’ => 0
    );
    $all_terms = get_terms( $att_taxonomy, apply_filters( ‘wcfm_product_attribute_terms’, $args ) );
    $attributes_option = array();
    if ( $all_terms ) {
    foreach ( $all_terms as $term ) {
    $attributes_option[$term->term_id] = esc_attr( apply_filters( ‘woocommerce_product_attribute_term_name’, $term->name, $term ) );
    }
    }
    $attributes[$acnt][‘option_values’] = $attributes_option;
    $attributes[$acnt][‘value’] = wp_get_post_terms( $product_id, $att_taxonomy, array( ‘fields’ => ‘ids’ ) );
    $attributes[$acnt][‘is_active’] = “;
    $attributes[$acnt][‘is_visible’] = “;
    $attributes[$acnt][‘is_variation’] = “;

    if( $product_id && !empty( $wcfm_attributes ) ) {
    foreach( $wcfm_attributes as $wcfm_attribute ) {
    if ( $wcfm_attribute[‘is_taxonomy’] ) {
    if( $att_taxonomy == $wcfm_attribute[‘name’] ) {
    $attributes[$acnt][‘is_active’] = ‘enable’;
    $attributes[$acnt][‘is_visible’] = $wcfm_attribute[‘is_visible’] ? ‘enable’ : “;
    $attributes[$acnt][‘is_variation’] = $wcfm_attribute[‘is_variation’] ? ‘enable’ : “;
    }
    }
    }
    }

    // Global Level
    $allow_add_term = “;
    if( WCFM_Dependencies::wcfmu_plugin_active_check() && apply_filters( ‘wcfm_is_allow_add_attribute_term’, true ) ) {
    $allow_add_term = ‘wc_attribute_values allow_add_term’;
    }
    $attrlimit = apply_filters( ‘wcfm_attribute_limit’, -1 );

    // Attribute wise level
    if( !apply_filters( ‘wcfm_is_allow_add_attribute_term_’.$att_taxonomy, true, $att_taxonomy ) ) {
    $allow_add_term = “;
    }
    $attrlimit = apply_filters( ‘wcfm_attribute_limit_’.$att_taxonomy, $attrlimit, $att_taxonomy );

    $attributes = apply_filters( ‘wcfm_product_custom_attributes_data’, apply_filters( ‘wcfm_product_custom_attribute_date_’.$att_taxonomy, $attributes, $att_taxonomy ) );
    $WCFM->wcfm_fields->wcfm_generate_form_field( apply_filters( ‘wcfm_product_custom_attributes’, apply_filters( ‘wcfm_product_custom_attribute_’.$att_taxonomy, array(
    „select_attributes_“.$att_taxonomy => array( ‘type’ => ‘multiinput’, ‘class’ => ‘wcfm-text wcfm_select_attributes wcfm_ele simple variable external grouped booking’, ‘label_class’ => ‘wcfm_title’, ‘value’ => $attributes, ‘options’ => array(
    „term_name“ => array(‘type’ => ‘hidden’),
    „is_active“ => array(‘label’ => __(‘Active?’, ‘wc-frontend-manager’), ‘type’ => ‘checkbox’, ‘value’ => ‘enable’, ‘attributes’ => array( ‘title’ => __( ‘Check to associate this attribute with the product’, ‘wc-frontend-manager-ultimate’ ) ), ‘class’ => ‘wcfm-checkbox wcfm_ele attribute_ele simple variable external grouped booking’, ‘label_class’ => ‘wcfm_title attribute_ele checkbox_title’),
    „name“ => array(‘label’ => __(‘Name’, ‘wc-frontend-manager’), ‘type’ => ‘text’, ‘attributes’ => array( ‘readonly’ => true ), ‘class’ => ‘wcfm-text wcfm_ele attribute_ele simple variable external grouped booking’, ‘label_class’ => ‘wcfm_title attribute_ele’),
    „value“ => array(‘label’ => __(‘Value(s):’, ‘wc-frontend-manager’), ‘type’ => ‘select’, ‘custom_attributes’ => array( ‘attrlimit’ => $attrlimit ), ‘attributes’ => array( ‘multiple’ => ‘multiple’, ‘style’ => ‘width: 60%;’ ), ‘class’ => ‘wcfm-select wcfm_ele simple variable external grouped booking ‘ . $allow_add_term, ‘label_class’ => ‘wcfm_title’),
    „is_visible“ => array(‘label’ => __(‘Visible on the product page’, ‘wc-frontend-manager’), ‘type’ => ‘checkbox’, ‘value’ => ‘enable’, ‘class’ => ‘wcfm-checkbox wcfm_ele simple variable external grouped booking’, ‘label_class’ => ‘wcfm_title checkbox_title’),
    „is_variation“ => array(‘label’ => __(‘Use as Variation’, ‘wc-frontend-manager’), ‘type’ => ‘checkbox’, ‘value’ => ‘enable’, ‘class’ => ‘wcfm-checkbox wcfm_ele variable variable-subscription’, ‘label_class’ => ‘wcfm_title checkbox_title wcfm_ele variable variable-subscription’),
    „tax_name“ => array(‘type’ => ‘hidden’),
    „is_taxonomy“ => array(‘type’ => ‘hidden’)
    ))
    ), ‘select_attributes_’.$att_taxonomy, $att_taxonomy, $attributes ), ‘select_attributes_’.$att_taxonomy ) );
    }
    }
    }`Sad mene zanima kako pomocu funkcije da ga zamenim, da lista samo atribute koje ja zadam

    Форум: Проблеми
    Као одговор на: Access Press Mag

    koji konkretno na kojoj poziciji. Dak nesto jos od podatka

    Форум: Проблеми
    Као одговор на: Odredjivanje uloge korisnika ne radi

    probaj sa ovim if( current_user_can('administrator') )

    • Овај одговор је промењен 5 years, 6 months раније од стране bakalnicasrbija.
    Форум: WooCommerce
    Као одговор на: woocommerce

    Nisam imao iskustva sa time ali mozda bi moglo nesto da se uradi ako nema slicno. Treba ti da izvuces sve to iz tabele i da uradis fakturu koju bi poslao kupcu. Ne mogu sad ovako napamet ali videcu ako nesto nadjem.

    Форум: WooCommerce
    Као одговор на: woocommerce

    U ovom tvom slucaju komercialtija je u stvari prodavac i on ima samo svoje kupce koji kupuju od njega ili preko njega.?Ja sam to mislio da radim preko wc-marketplace posto tu svaki prodavac ima sve to sto si naveo ali od njega kupuju svi sad cu da vidim kako bi moglo da se navede da kupuju samo pojedin. To je ono sto ce meni tek trebati ali sad imam osnov koji radim i to radim preko njega. Tebi u stvari treba da se vidi sta su odredjeni kupci kupili a ovde je sta su prodvaci prodali.Treba znaci povezati na neki nacin kupce i prodavca u ovom tvom slucaju komercialstu i dati zbir onoga sto su oni kupovali. Ako tako nesto nema moze se uraditi da se iz baze izvuku svi ti podaci. Moze u meta podacima da se dodaju id kupaca njegovih a znas sata jos mozes. Jesi li razmisljao o ovome https://codex.wordpress.org/Create_A_Network? Koliko imas tih komercialti? Da udaris za svakoga poseban sajt, nije to bukvalno poseban vec u sklopu jednog mogucnost da imas nekoliko sajtova u istoj bazi. Pogledaj link.

    Форум: WooCommerce
    Као одговор на: woocommerce

    Radim nesto slicno pa sam uzeo plugin wc-marketplace.com.

    Sad redom da ti kazem sta znam i sta sam i sam radio.
    Sto se cena tice tu mozes da dodas dodatno polje koje ce videti samo registrovani korisnik sa odredjenom privilegijom. Znaci dodas nove privilegije vidi ovde ili pronadji sam https://wedevs.com/98266/add-custom-user-roles-wordpress/
    Zatim pomocu current_user_can proveris koji je nivo registrovani korisnik i prikazes mu cenu.Sad ne znam koliko ces tih imati i na koji nacin odredjujes cenu da li posebno svaki ima svoju cenu ili ces d ih stavis u neku grupu. To mi reci pa cu ti reci sta i kako ces dalje.Imao sam tako nesto i sam u vidu da uradim pa sam isto zapeo kod toga da dodam komercialistu ali cu videti da ti nekako pomognem

Посматрање 6 одговора - 1 до 6 (од укупно 6)