Jump to content

Display Of Delivery Time In List And Grid


Recommended Posts

This has occurred from when I started with 1.6.1.2. Now using 1.6.1.4 with European Compliance module version (1.5 -) 2.0.:

 

post-1133623-0-60038400-1454317975_thumb.pngpost-1133623-0-43864400-1454317850_thumb.png

 

Originally also the unit prices weren't shown - this I could solve through the German forum. But I still need the delivery times to be displayed as well. Probably requires some changes to template files. Unfortunately I can't figure this out by myself and can't find any solution anywhere. Help would be appreciated.

 

The next screenshot is from the module "block featured products on homepage". It's working fine there, also on the product pages:

post-1133623-0-83806400-1454318555_thumb.png

Link to comment
Share on other sites

No idea anybody? The Avanced EU Compliance module is essential - especially for Germany. It's not even sufficient to fulfil all the legal regulations. What would you guys do if you did not (have to) use this module but wanted the delivery times to be displayed after all? What is the default module that Nemo1 mentioned? How is it done without the module I am using?

 

It seems to me that this wholething shouldn't be a very big deal for programmers, so I was hoping someone would have a solution or at least an idea. I may be wrong, of course.

 

Background: Whether delivery times have to be displayed in such lists or not is highly disputed (only talking about Germany). As a matter of fact, there are shopping cart buttons there. And it's good they are there. Now some people may have the opinion that where ever there is a cart button, there have to be all mandatory informations as well, which are unit prices, delivery times, and references to tax and shipping cost informations. Prestashop is a nice system, but in some (or many?) countries not safe to operate, unless you like pay high fees for violating competition regulations. This is - afaik - why the Advanced EU Compliance module has been developed. Unfortunately it's not nearly perfect. But since it's free, I have no right to complain. I am willing to override or change the imperfect issues, but unfortunatley I always need guidance... only having superficial knowledge of programming.

Link to comment
Share on other sites

Hi hbamberger,

 

open the file

/themes/default-bootstrap/product-list.tpl

go to line 94 there you'll find something like that:

 

                                    {/if}
                                    {hook h="displayProductPriceBlock" product=$product type="price"}
                                    {hook h="displayProductPriceBlock" product=$product type="unit_price"}
                                {/if}
                            </div>

insert the line

 

{hook h="displayProductPriceBlock" product=$product type='after_price'}

the result should look like this:

 

                            {/if}
                            {hook h="displayProductPriceBlock" product=$product type="price"}
                            {hook h="displayProductPriceBlock" product=$product type="unit_price"}
                            {hook h="displayProductPriceBlock" product=$product type='after_price'}
                        {/if}
                    </div>

 

And don't foget to recompile & delete the cache!

 

regards

Whiley

Edited by Whiley (see edit history)
Link to comment
Share on other sites

Hi hbamberger,

 

open the file

/themes/default-bootstrap/product-list.tpl

[...]

the result should look like this:

 

                            {/if}

                            {hook h="displayProductPriceBlock" product=$product type="price"}

                            {hook h="displayProductPriceBlock" product=$product type="unit_price"}

                            {hook h="displayProductPriceBlock" product=$product type='after_price'}

                        {/if}

                    </div>

regards

Whiley

 Hi Whiley,

 

thank you, but my product-list.tpl was already edited before in order to display the unit prices. It looks like this:

             {/if}

             {hook h="displayProductPriceBlock" product=$product type="price"}

             {if !empty($product.unity) && $product.unit_price_ratio > 0.000000}

             {math equation="pprice / punit_price" pprice=$product.price punit_price=$product.unit_price_ratio assign=unit_price}

             {convertPrice price=$unit_price} {l s='per'} {$product.unity|escape:'html':'UTF-8'}

             {/if}

             {hook h="displayProductPriceBlock" product=$product type='after_price'}

             {/if}

        </div>

 

This was done because the unit prices also weren't displayed with the original file. This solution can be found somewhere here in the forum (don't remember whether German or English). As you see, your extra line has already be included. With this file I get the results as shown in the screenshots. But the delivery time is missing, and that is my problem. I just experimented a little with this section, e.g. replaced with your code, but all I get is either no change or a blank page.

Link to comment
Share on other sites

Sorry, I don't understand this. The same way - how? In your example, the delivery time is displayed. These products have no unit prices. For mine I need both. But only the unit prices are displayed, and the delivery times are not. So what do to? What is missing in my product-list.tpl?

Link to comment
Share on other sites

You are right. We are approaching the solution. But with what you suggested (original product-list.tpl file with the one line added), all I get is that the delivery times are displayed, but the unit prices are gone again.

 

So the solution must be the changes I had made before in combination with your suggestion. I tried many things, and eventually this:

 

 

(in my case line 95):

                          {/if}
                                    {hook h="displayProductPriceBlock" product=$product type="price"}
                                    {if !empty($product.unity) && $product.unit_price_ratio > 0.000000}
                                    {math equation="pprice / punit_price" pprice=$product.price punit_price=$product.unit_price_ratio assign=unit_price}
                                    {convertPrice price=$unit_price} {l s='per'} {$product.unity|escape:'html':'UTF-8'}
                                    {hook h="displayProductPriceBlock" product=$product type='after_price'}
                        {/if}
                                {/if}
                            </div>
                       

 

(And in my case line 151:

{/if}
                            {hook h="displayProductPriceBlock" product=$product type="price"}
                            {if !empty($product.unity) && $product.unit_price_ratio > 0.000000}
                            {math equation="pprice / punit_price" pprice=$product.price punit_price=$product.unit_price_ratio assign=unit_price}
                            {convertPrice price=$unit_price} {l s='per'} {$product.unity|escape:'html':'UTF-8'}
   {/if}
                            {hook h="displayProductPriceBlock" product=$product type='after_price'}
                        {/if}
                    </div>

 

And this seems to work. Still have to do some tests, but I'm confident now.

 

Thank you for the help I needed to help myself (not that I understand this code really, like which "if" belongs where and why, but who cares ;) ).

 

As soon as I'm sure this really works, I will mark this as "answered".

 

 

Edited by hbamberger (see edit history)
Link to comment
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
×
×
  • Create New...