Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Show Price Also From Another Usergroup Rate Topic   - - - - -


Posted 02 November 2018 - 10:44 AM #1



We have different prices for an particular usergroup.
When the are logged in the see their prices, this is ok.


What I want is that they also see the default price as if they are not logged in.


What I have so far is this.

In my-Changes i have an file prices_block.override.tpl

But it won't show the default price of usergroup "0"

{include file="views/profiles/components/profiles_scripts.tpl"}
{include file="views/profiles/components/profile_fields.tpl"}

{if $product.price|floatval || $product.zero_price_action == "P" || ($hide_add_to_cart_button == "Y" && $product.zero_price_action == "A")}
    <span class="ty-price{if !$product.price|floatval && !$product.zero_price_action} hidden{/if}" id="line_discounted_price_{$obj_prefix}{$obj_id}">{include file="common/price.tpl" value=$product.price span_id="discounted_price_`$obj_prefix``$obj_id`" class="ty-price-num" live_editor_name="product:price:{$product.product_id}" live_editor_phrase=$product.base_price} </span><span class="list-price-label">({__("including_tax")}){if $product.unit_name} per {$product.unit_name}{/if}</span><br><span class="list-price-label-exc">&euro; {$product.clean_price|number_format:2:",":"."}<span class="list-price-label"> ({__("exc_tax")}){if $product.unit_name} per {$product.unit_name}{/if}</span></span>
{if $auth.usergroup_ids[2] == 7}

{include file="common/price.tpl" value=$product.price && $usergroup.usergroup_ids[2] == 0 }</span>                     


{elseif $product.zero_price_action == "A" && $show_add_to_cart}
                    {assign var="base_currency" value=$currencies[$smarty.const.CART_PRIMARY_CURRENCY]}
                    <span class="ty-price-curency"><span class="ty-price-curency__title">{__("enter_your_price")}:</span>
                    <div class="ty-price-curency-input">
                        {if $base_currency.after != "Y"}{$base_currency.symbol nofilter}{/if}
                        <input class="ty-price-curency__input" type="text" size="3" name="product_data[{$obj_id}][price]" value="" />
                        {if $base_currency.after == "Y"}{$base_currency.symbol nofilter}{/if}

                {elseif $product.zero_price_action == "R"}
                    <span class="ty-no-price">{__("contact_us_for_price")}</span>
                    {assign var="show_qty" value=false}




  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2441 posts

Posted 03 November 2018 - 06:35 AM #2

You can use a catalog promotion to give a certain usergroup a discount. Then, when logged in, the usergroup customers see the original price, as well as the discounted price. No coding needed.

When life hands you lemons, bring on the Tequila baby!