shima26 18 ارسال شده در بهمن 92 گزارش بازنشر ارسال شده در بهمن 92 (ویرایش شده) با سلام!همینطور که از عنوان تاپیک مشخصه قصد دارم یک زمینه دلخواه به قسمت برگه پرداخت اضافه کنم یعنی یک ستون به این باکس که توی تصویر ضمیمه کردم اضافه بشه ( مثلا کنار ستون خرید )یک ستون مثلا شامل نام نویسنده کتاب یا هر چیز دیگه ایی اضافه کنم تا از توی زمینه های دلخواه به اون مقدار بدمممنون میشم دوستاه راهنمایی بفرمایندپ.ن : توی مستندات خود افزونه جستجو کردن ولی چیزی دستگیرم نشد این تاپیکو ایجاد کردم ویرایش شده بهمن 92 توسط shima26 نقل قول لینک به ارسال
shima26 18 ارسال شده در بهمن 92 مالک گزارش بازنشر ارسال شده در بهمن 92 باید در افزونه تغییری ایجاد بشه یا کدی به فانشن اضافه بشه نقل قول لینک به ارسال
shima26 18 ارسال شده در اسفند 92 مالک گزارش بازنشر ارسال شده در اسفند 92 این کدهای صفحه پرداخت فقط نمیدونم زمینه رو چطوری وارد کنم <?php global $post; ?><table id="edd_checkout_cart" <?php if ( edd_is_ajax_enabled() ) { echo 'class="ajaxed"'; } ?>><thead> <tr class="edd_cart_header_row"> <?php do_action( 'edd_checkout_table_header_first' ); ?> <th class="edd_cart_item_name"><?php _e( 'Item Name', 'edd' ); ?></th> <th class="edd_cart_item_price"><?php _e( 'Item Price', 'edd' ); ?></th> <th class="edd_cart_actions"><?php _e( 'Actions', 'edd' ); ?></th> <?php do_action( 'edd_checkout_table_header_last' ); ?> </tr></thead><tbody> <?php $cart_items = edd_get_cart_contents(); ?> <?php if ( $cart_items ) : ?> <?php do_action( 'edd_cart_items_before' ); ?> <?php foreach ( $cart_items as $key => $item ) : ?> <tr class="edd_cart_item" id="edd_cart_item_<?php echo esc_attr( $key ) . '_' . esc_attr( $item['id'] ); ?>" data-download-id="<?php echo esc_attr( $item['id'] ); ?>"> <?php do_action( 'edd_checkout_table_body_first', $item ); ?> <td class="edd_cart_item_name"> <?php if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $item['id'] ) ) { echo '<div class="edd_cart_item_image">'; echo get_the_post_thumbnail( $item['id'], apply_filters( 'edd_checkout_image_size', array( 25,25 ) ) ); echo '</div>'; } $item_title = get_the_title( $item['id'] ); if ( ! empty( $item['options'] ) && edd_has_variable_prices( $item['id'] ) ) { $item_title .= ' - ' . edd_get_cart_item_price_name( $item ); } echo '<span class="edd_checkout_cart_item_title">' . esc_html( $item_title ) . '</span>'; ?> </td> <td class="edd_cart_item_price"><?php echo edd_cart_item_price( $item['id'], $item['options'] ); ?></td> <td class="edd_cart_actions"> <?php if( edd_item_quantities_enabled() ) : ?> <input type="number" min="1" step="1" name="edd-cart-download-<?php echo $key; ?>-quantity" class="edd-input edd-item-quantity" value="<?php echo edd_get_cart_item_quantity( $item['id'], $item['options'] ); ?>"/> <input type="hidden" name="edd-cart-downloads[]" value="<?php echo $item['id']; ?>"/> <input type="hidden" name="edd-cart-download-<?php echo $key; ?>-options" value="<?php esc_attr_e( serialize( $item['options'] ) ); ?>"/> <?php endif; ?> <a href="<?php echo esc_url( edd_remove_item_url( $key, $post ) ); ?>"><?php _e( 'Remove', 'edd' ); ?></a> </td> <?php do_action( 'edd_checkout_table_body_last', $item ); ?> </tr> <?php endforeach; ?> <!-- Show any cart fees, both positive and negative fees --> <?php if( edd_cart_has_fees() ) : ?> <?php foreach( edd_get_cart_fees() as $fee_id => $fee ) : ?> <tr class="edd_cart_fee" id="edd_cart_fee_<?php echo $fee_id; ?>"> <td class="edd_cart_fee_label"><?php echo esc_html( $fee['label'] ); ?></td> <td class="edd_cart_fee_amount"><?php echo esc_html( edd_currency_filter( edd_format_amount( $fee['amount'] ) ) ); ?></td> <td></td> </tr> <?php endforeach; ?> <?php endif; ?> <?php do_action( 'edd_cart_items_after' ); ?> <?php endif; ?></tbody><tfoot> <?php if( has_action( 'edd_cart_footer_buttons' ) ) : ?> <tr class="edd_cart_footer_row"> <th colspan="<?php echo edd_checkout_cart_columns(); ?>"> <?php do_action( 'edd_cart_footer_buttons' ); ?> </th> </tr> <?php endif; ?> <?php if( edd_use_taxes() ) : ?> <tr class="edd_cart_footer_row edd_cart_subtotal_row"<?php if ( ! edd_is_cart_taxed() ) echo ' style="display:none;"'; ?>> <?php do_action( 'edd_checkout_table_subtotal_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_subtotal"> <?php _e( 'Subtotal', 'edd' ); ?>: <span class="edd_cart_subtotal"><?php echo edd_cart_subtotal(); ?></span> </th> <?php do_action( 'edd_checkout_table_subtotal_last' ); ?> </tr> <tr class="edd_cart_footer_row edd_cart_tax_row"<?php if( ! edd_is_cart_taxed() ) echo ' style="display:none;"'; ?>> <?php do_action( 'edd_checkout_table_tax_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_tax"> <?php _e( 'Tax', 'edd' ); ?>: <span class="edd_cart_tax_amount" data-tax="<?php echo edd_get_cart_tax( false ); ?>"><?php echo esc_html( edd_cart_tax() ); ?></span> </th> <?php do_action( 'edd_checkout_table_tax_last' ); ?> </tr> <?php endif; ?> <tr class="edd_cart_footer_row edd_cart_discount_row" <?php if( ! edd_cart_has_discounts() ) echo ' style="display:none;"'; ?>> <?php do_action( 'edd_checkout_table_discount_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_discount"> <?php edd_cart_discounts_html(); ?> </th> <?php do_action( 'edd_checkout_table_discount_last' ); ?> </tr> <tr class="edd_cart_footer_row"> <?php do_action( 'edd_checkout_table_footer_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_total"><?php _e( 'Total', 'edd' ); ?>: <span class="edd_cart_amount" data-subtotal="<?php echo edd_get_cart_total(); ?>" data-total="<?php echo edd_get_cart_total(); ?>"><?php edd_cart_total(); ?></span></th> <?php do_action( 'edd_checkout_table_footer_last' ); ?> </tr></tfoot></table> نقل قول لینک به ارسال
Parsa 23463 ارسال شده در اسفند 92 گزارش بازنشر ارسال شده در اسفند 92 خط 44 مربوط به زمینه هست<?php global $post; ?><table id="edd_checkout_cart" <?php if ( edd_is_ajax_enabled() ) { echo 'class="ajaxed"'; } ?>><thead> <tr class="edd_cart_header_row"> <?php do_action( 'edd_checkout_table_header_first' ); ?> <th class="edd_cart_item_name"><?php _e( 'Item Name', 'edd' ); ?></th> <th class="edd_cart_item_price"><?php _e( 'Item Price', 'edd' ); ?></th> <th class="edd_cart_actions"><?php _e( 'Actions', 'edd' ); ?></th> <th class="edd_cart_actions"><?php _e( 'zamine', 'edd' ); ?></th> <?php do_action( 'edd_checkout_table_header_last' ); ?> </tr></thead><tbody> <?php $cart_items = edd_get_cart_contents(); ?> <?php if ( $cart_items ) : ?> <?php do_action( 'edd_cart_items_before' ); ?> <?php foreach ( $cart_items as $key => $item ) : ?> <tr class="edd_cart_item" id="edd_cart_item_<?php echo esc_attr( $key ) . '_' . esc_attr( $item['id'] ); ?>" data-download-id="<?php echo esc_attr( $item['id'] ); ?>"> <?php do_action( 'edd_checkout_table_body_first', $item ); ?> <td class="edd_cart_item_name"> <?php if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $item['id'] ) ) { echo '<div class="edd_cart_item_image">'; echo get_the_post_thumbnail( $item['id'], apply_filters( 'edd_checkout_image_size', array( 25,25 ) ) ); echo '</div>'; } $item_title = get_the_title( $item['id'] ); if ( ! empty( $item['options'] ) && edd_has_variable_prices( $item['id'] ) ) { $item_title .= ' - ' . edd_get_cart_item_price_name( $item ); } echo '<span class="edd_checkout_cart_item_title">' . esc_html( $item_title ) . '</span>'; ?> </td> <td class="edd_cart_item_price"><?php echo edd_cart_item_price( $item['id'], $item['options'] ); ?></td> <td class="edd_cart_actions"> <?php if( edd_item_quantities_enabled() ) : ?> <input type="number" min="1" step="1" name="edd-cart-download-<?php echo $key; ?>-quantity" class="edd-input edd-item-quantity" value="<?php echo edd_get_cart_item_quantity( $item['id'], $item['options'] ); ?>"/> <input type="hidden" name="edd-cart-downloads[]" value="<?php echo $item['id']; ?>"/> <input type="hidden" name="edd-cart-download-<?php echo $key; ?>-options" value="<?php esc_attr_e( serialize( $item['options'] ) ); ?>"/> <?php endif; ?> <a href="<?php echo esc_url( edd_remove_item_url( $key, $post ) ); ?>"><?php _e( 'Remove', 'edd' ); ?></a> </td> <td> <?php echo get_post_meta($item['id'],"zamine",true); ?> </td> <?php do_action( 'edd_checkout_table_body_last', $item ); ?> </tr> <?php endforeach; ?> <!-- Show any cart fees, both positive and negative fees --> <?php if( edd_cart_has_fees() ) : ?> <?php foreach( edd_get_cart_fees() as $fee_id => $fee ) : ?> <tr class="edd_cart_fee" id="edd_cart_fee_<?php echo $fee_id; ?>"> <td class="edd_cart_fee_label"><?php echo esc_html( $fee['label'] ); ?></td> <td class="edd_cart_fee_amount"><?php echo esc_html( edd_currency_filter( edd_format_amount( $fee['amount'] ) ) ); ?></td> <td></td> <td></td> </tr> <?php endforeach; ?> <?php endif; ?> <?php do_action( 'edd_cart_items_after' ); ?> <?php endif; ?></tbody><tfoot> <?php if( has_action( 'edd_cart_footer_buttons' ) ) : ?> <tr class="edd_cart_footer_row"> <th colspan="<?php echo edd_checkout_cart_columns(); ?>"> <?php do_action( 'edd_cart_footer_buttons' ); ?> </th> </tr> <?php endif; ?> <?php if( edd_use_taxes() ) : ?> <tr class="edd_cart_footer_row edd_cart_subtotal_row"<?php if ( ! edd_is_cart_taxed() ) echo ' style="display:none;"'; ?>> <?php do_action( 'edd_checkout_table_subtotal_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_subtotal"> <?php _e( 'Subtotal', 'edd' ); ?>: <span class="edd_cart_subtotal"><?php echo edd_cart_subtotal(); ?></span> </th> <?php do_action( 'edd_checkout_table_subtotal_last' ); ?> </tr> <tr class="edd_cart_footer_row edd_cart_tax_row"<?php if( ! edd_is_cart_taxed() ) echo ' style="display:none;"'; ?>> <?php do_action( 'edd_checkout_table_tax_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_tax"> <?php _e( 'Tax', 'edd' ); ?>: <span class="edd_cart_tax_amount" data-tax="<?php echo edd_get_cart_tax( false ); ?>"><?php echo esc_html( edd_cart_tax() ); ?></span> </th> <?php do_action( 'edd_checkout_table_tax_last' ); ?> </tr> <?php endif; ?> <tr class="edd_cart_footer_row edd_cart_discount_row" <?php if( ! edd_cart_has_discounts() ) echo ' style="display:none;"'; ?>> <?php do_action( 'edd_checkout_table_discount_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_discount"> <?php edd_cart_discounts_html(); ?> </th> <?php do_action( 'edd_checkout_table_discount_last' ); ?> </tr> <tr class="edd_cart_footer_row"> <?php do_action( 'edd_checkout_table_footer_first' ); ?> <th colspan="<?php echo edd_checkout_cart_columns(); ?>" class="edd_cart_total"><?php _e( 'Total', 'edd' ); ?>: <span class="edd_cart_amount" data-subtotal="<?php echo edd_get_cart_total(); ?>" data-total="<?php echo edd_get_cart_total(); ?>"><?php edd_cart_total(); ?></span></th> <?php do_action( 'edd_checkout_table_footer_last' ); ?> </tr></tfoot></table> 2 نقل قول لینک به ارسال
shima26 18 ارسال شده در اسفند 92 مالک گزارش بازنشر ارسال شده در اسفند 92 (ویرایش شده) ممنون آقا پارسا با دادن مقدار برای zamine چیزی در صفحه پرداخت نشان داده نشدخودم هم قبلا همین کارو می کردم ولی چیزی نشون داده نشد ویرایش شده اسفند 92 توسط shima26 نقل قول لینک به ارسال
Morteza 34190 ارسال شده در اسفند 92 گزارش بازنشر ارسال شده در اسفند 92 زمینه داره از $item['id'] مقدار میگیره که بخشی از $item هست که اونهم از edd_get_cart_contents() هست 1 نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .