Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
leonovich

Trader Feedback System + (SD) Sales Pro

Recommended Posts

Ребят, помогите пожалуйста внедрить в рынок (SD) Sales Pro отображение отзывов пользователя  Trader Feedback System.

Spanner обещал помочь, но он погиб 😞

Код Trader Feedback System который отображает отзывы в профиле форума.

Screenshot_3.png.cdf8da0954b01ddaa2f67f2e2980c399.png

<div class="cProfileFeedbackBlock ipsBox ipsSpacer_bottom">
	<a href="https://ps4.in.ua/profile/74398-tonda/?tab=node_feedback_Feedback">
		<div class="cProfileFeedback ipsPad_half cProfileFeedback_positive">
			<h2 class="ipsType_minorHeading">Отзывы</h2>
			<div class="cProfileFeedbackScore">
				<span data-ipstooltip="" title="Положительный"><i class="fa cFeedbackIcon_positive"></i> 5</span>
				<span data-ipstooltip="" title="Нейтральный"><i class="fa cFeedbackIcon_neutral"></i> 0</span>
				<span data-ipstooltip="" title="Негативный"><i class="fa cFeedbackIcon_negative"></i> 0</span>
			</div>
		</div>
		<p class="ipsType_reset ipsPad_half ipsType_right ipsType_light ipsType_small">
			Просмотр отзывов <i class="fa fa-caret-right"></i>
		</p>
	</a>
</div>

Код Trader Feedback System который висит в шаблоне, но при вставке его в рынок (SD) Sales Pro, он не работает - отображает ноли.

{{if member.canAccessModule( \IPS\Application\Module::get( 'feedback', 'feedback' ) )}}
<div class='cProfileFeedbackBlock ipsBox ipsSpacer_bottom'>
	<a href="{url="app=core&module=members&controller=profile&id={$member->member_id}&tab=node_feedback_Feedback" seoTemplate="profile" seoTitle="$member->members_seo_name"}">
		<div class='cProfileFeedback ipsPad_half {{if $member->feedb_percent >= 90}}cProfileFeedback_positive{{elseif $member->feedb_percent < 50 AND $member->feedb_neg}}cProfileFeedback_negative{{else}}cProfileFeedback_neutral{{endif}}'>
			<h2 class='ipsType_minorHeading'>{lang="feedback_profile_score_title"}</h2>
			<div class='cProfileFeedbackScore'>
				<span data-ipsTooltip title="{lang="feedback_profile_positive"}"><i class="fa cFeedbackIcon_positive"></i> {number="$member->feedb_pos"}</span>
				<span data-ipsTooltip title="{lang="feedback_profile_neutral"}"><i class="fa cFeedbackIcon_neutral"></i> {number="$member->feedb_neu"}</span>
				<span data-ipsTooltip title="{lang="feedback_profile_negative"}"><i class="fa cFeedbackIcon_negative"></i> {number="$member->feedb_neg"}</span>
			</div>
		</div>
		<p class='ipsType_reset ipsPad_half ipsType_right ipsType_light ipsType_small'>
			{lang="feedback_profile_link"} <i class='fa fa-caret-right'></i>
		</p>
	</a>
</div>
{{endif}}

 

Share this post


Link to post
Share on other sites

Какие переменные есть в шаблоне, в который вставляете код?

Share this post


Link to post
Share on other sites
02.09.2020 в 08:19, newbie сказал:

Какие переменные есть в шаблоне, в который вставляете код?

Вставляю сюда, здесь были встроенные отзывы от (SD) Sales Pro

Screenshot_4.thumb.png.e1cef2c1930b9104b5d62b5445112e72.png

<div class='ipsColumn ipsColumn_wide sdSellerData'>
    <div class='ipsPad ipsBox'>
        <h3 class='ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half'>{{if $offer->sell_type}}{lang="sd_salespro_seller_info"}{{else}}{lang="sd_salespro_buyer_info"}{{endif}}</h3>
        <div class="ipsPos_right ipsResponsive_hidePhone">
            {template="userPhoto" group="global" app="core" params="$offer->author(), 'tiny', $offer->warningRef()"}
        </div>
        <p class='ipsType_reset'>
            {$offer->author()->link( $offer->warningRef() )|raw}
        </p>
        {{$stats = \IPS\sdsalespro\Offer\PurchaseComment::getMemberCommentsStats( $offer->author() );}}

        {{if $offer->author()->member_id || $offer->canChangeAuthor()}}
            <hr class='ipsHr' />
            <ul class='ipsList_inline ipsType_small'>
                {{if $offer->author()->member_id}}
                    <li><a href='{url="app=core&module=members&controller=profile&id={$offer->author()->member_id}&do=content&type=sdsalespro_offer" base="front" seoTitles="$offer->author()->members_seo_name" seoTemplate="profile_content"}'>{lang="sd_salespro_offer_find_users_offers"}</a></li>
                {{endif}}
                {{if $offer->canChangeAuthor()}}
                    <li><a href='{$offer->url()->setQueryString( array( 'do' => 'changeAuthor' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="sd_salespro_offer_change_author_d"}" title='{lang="sd_salespro_offer_change_author_title"}'>{lang="sd_salespro_offer_change_author_d"}</a></li>
                {{endif}}
            </ul>
        {{endif}}
        {{if $offer->member_approve}}
            <p class='ipsType_reset ipsType_small ipsType_blendLinks ipsSpacer_top ipsSpacer_half'>
                {lang="sd_salespro_offer_approved_by" sprintf="\IPS\Member::load( $offer->member_approve )->name" htmlsprintf="\IPS\DateTime::ts( $offer->approve_date )->html()"}
            </p>
        {{endif}}
    </div>
    {{if \IPS\sdsalespro\Collection::canAddItemToCollection() || \IPS\sdsalespro\Wishlist::canAddItemToWishlist()}}
        <div class='ipsPad '>
            <ul class='ipsList_inline ipsType_small'>
                {{if \IPS\sdsalespro\Collection::canAddItemToCollection()}}
                    {{if \IPS\sdsalespro\Collection::isInMemberCollection( $offer )}}
                        <li><a href='{$offer->url()->setQueryString( array( 'do' => 'delFromCollect' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="sd_salespro_offer_del_from_collection"}" title='{lang="sd_salespro_offer_del_from_collection"}'><i class='fa fa-star'></i> {lang="sd_salespro_offer_del_from_collection_d"}</a></li>
                    {{else}}
                        <li><a href='{$offer->url()->setQueryString( array( 'do' => 'addToCollect' ) )}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="sd_salespro_offer_add_to_collection"}" title='{lang="sd_salespro_offer_add_to_collection"}'><i class='fa fa-star-o'></i> {lang="sd_salespro_offer_add_to_collection_d"}</a></li>
                    {{endif}}
                {{endif}}
                {{if \IPS\sdsalespro\Wishlist::canAddItemToWishlist()}}
                    {{if \IPS\sdsalespro\Wishlist::isInMemberWishlist( $offer )}}
                        <li><a href='{$offer->url()->setQueryString( array( 'do' => 'delFromWishlist' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="sd_salespro_offer_del_from_wishlist"}" title='{lang="sd_salespro_offer_del_from_wishlist"}'><i class='fa fa-heart'></i> {lang="sd_salespro_offer_del_from_wishlist_d"}</a></li>
                    {{else}}
                        <li><a href='{$offer->url()->setQueryString( array( 'do' => 'addToWishlist' ) )}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="sd_salespro_offer_add_to_wishlist"}" title='{lang="sd_salespro_offer_add_to_wishlist"}'><i class='fa fa-heart-o'></i> {lang="sd_salespro_offer_add_to_wishlist_d"}</a></li>
                    {{endif}}
                {{endif}}
            </ul>
        </div>
    {{endif}}
</div>

 

Share this post


Link to post
Share on other sites
{{if member.canAccessModule( \IPS\Application\Module::get( 'feedback', 'feedback' ) )}}
{{$member = $offer->author();}}
<div class='cProfileFeedbackBlock ipsBox ipsSpacer_bottom'>
	<a href="{url="app=core&module=members&controller=profile&id={$member->member_id}&tab=node_feedback_Feedback" seoTemplate="profile" seoTitle="$member->members_seo_name"}">
		<div class='cProfileFeedback ipsPad_half {{if $member->feedb_percent >= 90}}cProfileFeedback_positive{{elseif $member->feedb_percent < 50 AND $member->feedb_neg}}cProfileFeedback_negative{{else}}cProfileFeedback_neutral{{endif}}'>
			<h2 class='ipsType_minorHeading'>{lang="feedback_profile_score_title"}</h2>
			<div class='cProfileFeedbackScore'>
				<span data-ipsTooltip title="{lang="feedback_profile_positive"}"><i class="fa cFeedbackIcon_positive"></i> {number="$member->feedb_pos"}</span>
				<span data-ipsTooltip title="{lang="feedback_profile_neutral"}"><i class="fa cFeedbackIcon_neutral"></i> {number="$member->feedb_neu"}</span>
				<span data-ipsTooltip title="{lang="feedback_profile_negative"}"><i class="fa cFeedbackIcon_negative"></i> {number="$member->feedb_neg"}</span>
			</div>
		</div>
		<p class='ipsType_reset ipsPad_half ipsType_right ipsType_light ipsType_small'>
			{lang="feedback_profile_link"} <i class='fa fa-caret-right'></i>
		</p>
	</a>
</div>
{{endif}}

либо

{{if \IPS\Application::appIsEnabled('feedback')}}
	{template="feedbackScore" group="profile" app="feedback" params="$offer->author()"}
{{endif}}

 

  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...