ファンクション
wcexwl_get_wishlist_row( array $row )
お気に入りリストの特定の一つの商品のHTMLを返す
パラメータ パラメータ
- $row
(配列) (必須)
ファイル: src/template-functions.php
function wcexwl_get_wishlist_row(array $row) { $id = $row['id']; $sections = wcexwl_get_wlpage_all_row_sections($row); $ipricerow = $sections['ipricerow']; $istockrow = $sections['istockrow']; $igptekiyo = $sections['igptekiyo']; $addtocartbtn = $sections['addtocartbtn']; $deletebtn = $sections['deletebtn']; $ipagebtn = $sections['ipagebtn']; $checkbox = $sections['checkbox']; $thumbnail = $sections['thumbnail']; $ioptions = $sections['ioptions']; ob_start(); ?> <div class="wcexwl mt-1rem item-info"> <?php echo $ipricerow; ?> <?php if (!$row['itemDeleted']) : ?> <?php echo $istockrow; ?> <?php if ($row['isgptekiyo']) : ?> <?php echo $igptekiyo?> <?php endif; ?> <?php endif; ?> </div> <?php $actionDetails = (string)ob_get_clean(); /** * Filters the HTML of the action details for an item row displayed on the wishlist page * * @important * @param string $actionDetails * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ $actionDetails = apply_filters('wcexwl_filter_wlpage_action_details_section', $actionDetails, $row, $sections); ob_start(); if ($row['itemDeleted']) { ?> <div class="item-info-extra"> <span><?php echo $row['deletedInfoText']; ?></span> </div> <?php echo $deletebtn; ?> <?php echo $actionDetails; } elseif (!$row['optionsAreValid']) { ?> <div class="item-info-extra"> <span><?php echo $row['changedOptsText']; ?></span> </div> <div class="wcexwl mb-05rem-children-not-last"> <?php echo $ipagebtn; ?> <?php echo $deletebtn; ?> </div> <?php echo $actionDetails; } else { ?> <div class="wcexwl mb-05rem-children-not-last"> <?php echo $addtocartbtn; ?> <?php echo $deletebtn; ?> </div> <?php echo $actionDetails; } $actionSection = (string)ob_get_clean(); /** * Filters the HTML of the action section for an item row displayed on the wishlist page * * @important * @param string $actionSection * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ $actionSection = apply_filters('wcexwl_filter_wlpage_action_section', $actionSection, $row, $sections); ob_start(); ?> <div id="wcexwl_row_<?php echo $id; ?>" class="wl-grid row-item"> <div class="wcexwl flex column-nowrap item-image-area"> <?php ob_start(); ?> <div class="wcexwl flex column-nowrap"> <?php echo $checkbox; ?> <div class="item-thumbnail"> <?php echo $thumbnail; ?> </div> </div> <?php $html = (string)ob_get_clean(); /** * Filters the HTML of the item image area for an item row displayed on the wishlist page * * @important * @param string $html * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ echo apply_filters('wcexwl_filter_wlpage_item_image_area', $html, $row, $sections); ?> </div> <div class="wl-subgrid"> <div class="item-description-area"> <?php ob_start(); ?> <p> <?php /** * Filters the HTML of the cart item name for an item row displayed on the wishlist page * * @important * @param string $html * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ echo apply_filters( 'wcexwl_filter_wlpage_cart_item_name', $row['cartItemName'] . '<br />', $row, $sections ); echo $ioptions; /** * Use this hook to add HTML to the bottom of the item description area for each * item on the wishlist page. * * @important * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ do_action('wcexwl_wlpage_after_item_description_area_options', $row, $sections); ?> </p> <?php $html = (string)ob_get_clean(); /** * Filters the HTML of the item description area for an item row displayed on the wishlist page * * @important * @param string $html * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ echo apply_filters('wcexwl_filter_wlpage_item_description_area', $html, $row, $sections); ?> </div> <div class="item-actions-area"> <?php ob_start(); ?> <div class="wcexwl flex actions-wrapper"> <div class="wcexwl flex column-nowrap actions w-100"> <?php echo $actionSection; ?> </div> </div> <?php $html = (string)ob_get_clean(); /** * Filters the HTML of the actions area for an item row displayed on the wishlist page * * @important * @param string $html * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ echo apply_filters('wcexwl_filter_wlpage_item_actions_area', $html, $row, $sections); ?> </div> </div> </div> <?php $html = (string)ob_get_clean(); /** * Filters all HTML for an item row displayed on the wishlist page * * @important * @param string $html * @param array $row See \Aivec\Welcart\Extensions\Wishlist\API\CRUD::buildWishlistRow() * @param array $sections See wcexwl_get_wlpage_all_row_sections() */ $html = apply_filters('wcexwl_filter_wlpage_wishlist_row', $html, $row, $sections); return $html; }