Volume Price Range

  • Posts: 260
  • Thank you received: 25
12 years 3 months ago #80745

Not sure what it was, but code accepted this morning.

It has made no different though.



Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
12 years 3 months ago #81002

It is confusing why the listing price is rendered differently in the 'show_default' and 'listing_table' when the original 'listing_price' code is changed.

If I looking into the code (and I am not a coder) for listing_table,

I see that code responsible for rendering the 'listing_price' in 'listing_table' is as follows:

<?php
            if($this->params->get('show_price','-1')=='-1'){
              $config =& hikashop_config();
              $this->params->set('show_price',$config->get('show_price'));
            }
            if($this->params->get('show_price')){ ?>
            <td class="hikashop_product_price_row">
            <?php
              $this->setLayout('listing_price');
              echo $this->loadTemplate();
            ?>
            </td>
          <?php } ?>

<?php
            if($this->params->get('show_price','-1')=='-1'){
              $config =& hikashop_config();
              $this->params->set('show_price',$config->get('show_price'));
            }
            if($this->params->get('show_price')){ ?>
            <td class="hikashop_product_price_row">
            <?php
              $this->setLayout('listing_price');
              echo $this->loadTemplate();
            ?>
            </td>
          <?php } ?>
So logic would say that if they both render correctly when default 'listing_price' is used that they render differently when 'listing_price' is changed is caused by a conflict with the code that was changed in 'listing_price'.

Any clues on the conflict?

(Sorry for persistence, but very important that I get the table to display properly.)


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Last edit: 12 years 2 months ago by Jerome.

Please Log in or Create an account to join the conversation.

  • Posts: 83398
  • Thank you received: 13491
  • MODERATOR
12 years 3 months ago #81336

The problem does not come from the listing_table file but from the way the listing_price file has been modified.
Normally, the "each" text is displayed with the translation system, so a translation override of the PER_UNIT key should allow you to display 1 to 10 instead of each:
www.hikashop.com/en/download/languages.html#modify

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
12 years 3 months ago #81341

Hi Nicolas,

Thanks for reply.

Just to clarify, here are the two displays:

1) Table Layout

On this page, it displays each product with,

  • AU $ 1.51 each
  • AU $ 1.26 10+
  • AU $ 1.04 100+

2) Product Display

On this page, it displays each product with,
  • AU $ 1.51 1 to 10
  • AU $ 1.26 11 to 100
  • AU $ 1.04 100+

Changing the 'each' to say 1-10 in the language file will certainly change the Table Layout, BUT, what if the pricing tier is not 1-10, but 1-100?

Also, just changing the each in the language file doesnt change the second tier, (10+) to be as it is on the product page 10-100.

Does that make sense? (I am wanting the table to display the price ties the same way it does on the product


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
12 years 3 months ago #81592

Ok... it is down to this

if(isset($this->row->prices[$nextMin])) {
echo ($price->price_min_quantity+1)." to ".$this->row->prices[$nextMin]->price_min_quantity;
} else {
echo ($price->price_min_quantity)."+";

When displaying the results of this (show_price) on the Product Page :
the 'if(isset($this->row->prices[$nextMin]))' argument is true and the prices are displayed via:
echo ($price->price_min_quantity+1)." to ".$this->row->prices[$nextMin]->price_min_quantity;
( and rendered as 1 to 10, or 11 to 100, etc)

BUT..When displaying products on the Product Table ,
the 'if(isset($this->row->prices[$nextMin]))' argument is NOT True and the prices are displayed via
echo ($price->price_min_quantity)."+";;
( and rendered as 1+ , or 10+ , etc)

So, as both are rendering from show_price, (customized by the code supplied) why is the statement true on one page and false on the other?

Please, I REALLY need this to work :(


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Last edit: 12 years 3 months ago by sambob.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 3 months ago #81657

Hi,

The problem come from that in the listing the products seems to not have the same prices.

Could you give us a backend access ?

The following user(s) said Thank You: sambob

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
12 years 3 months ago #81734

Hi Xavier,

I PM'd the login details


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
12 years 2 months ago #81974

Hi Xavier,

You say "The problem come from that in the listing the products seems to not have the same prices",

That's not correct!

I have checked all layouts and the prices are the same for both 'Product Table' and 'Product Default'.

There is something wrong with either the code provided or the way the code is being treated by 'listing_table'.

Without the provided 'Listing_Price' code amendment, both table layout and product display the same. With the code added, they display differently.


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Last edit: 12 years 2 months ago by sambob.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 2 months ago #82030

Hi,

The problem is that when it's a product listing the $nextMin value should not be equal to $k +1, because the $k isn't incremented by 1 in the listing but by another value.
So it will require more edition in the product_listing view.

Actually we don't have time to provide this kind of code, besides it's a customization, not a bug so it's not our priority.
I suggest you to post a request in the commercial job section of this forum, or ask to a third developer.

Hope that you understand.

Regards.

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
12 years 2 months ago #82142

A bit dissapointed that it has taken over two weeks to determine.

I am more than happy to pay.

I do think you should consider correcting whatever is creating the conflict for futre editions as tier pricing is very important to many and the default display style is very clumsy.

Yes, I understand.


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Last edit: 12 years 2 months ago by sambob.

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum