VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: vaskern on August 17, 2014, 14:15:24 PM

Title: Turn off "Shipment price display in product details" in 2.6.8?
Post by: vaskern on August 17, 2014, 14:15:24 PM
I noticed shipment info is included along with the price on the product page (a new feature of 2.6.8 ) (http://virtuemart.net/news/latest-news/461-virtuemart-2-6-8-includes-realex). Great feature, but for now I would like to turn it off - any setting for that?
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: jenkinhill on August 17, 2014, 15:47:49 PM
This feature was requested by many VM users. When I don't need it ATM I comment out or remove the code from components/com_virtuemart/views/productdetails/tmpl/default.php  and use the edited fille as a template override.


if (is_array($this->productDisplayShipments)) {
    foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment . '<br />';
    }
}
if (is_array($this->productDisplayPayments)) {
    foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment . '<br />';
    }
}
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: baloe98 on August 20, 2014, 00:22:14 AM
It is a nice extra but it should be nicer if you can choose to turn it on or out.

grt

Adri
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: jpsosiego on August 20, 2014, 17:32:29 PM
I think is a bad idea to put shipping cost in every product, because shipping cost is calculated when user finally selected all items he need to buy, and total shipping cost for whole order will be lower than for a single per single product, then if user see, for example, 5 usd  plus for every product, maybe he decide not to buy on that virtual store.
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: KHM on August 27, 2014, 15:54:40 PM
I tried the follow the removal procedure and commented out the suggested block but  text is still present.

What (else) am I missing?

Thanks.
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: GJC Web Design on August 27, 2014, 16:28:41 PM
then your in the wrong file or did it incorrectly
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: KHM on August 27, 2014, 16:59:34 PM
Well there's no doubt I did it in the right file, even removed the entire section and emtpied cache but the text is still there.
Attachments (edit: added a second one ) also shows some text (in native tongue) suggesting pickup at the store is free. Sticky too.

What else do I need to do? Blank out some text string files?



[attachment cleanup by admin]
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: GJC Web Design on August 27, 2014, 18:02:03 PM
sorry - don't believe you.. if you really removed / commented that code from the right file then that code can't show..
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: jenkinhill on August 27, 2014, 19:01:26 PM
Unless a template override is being used.....

I believe a switch for this has been added in 2.6.8a - currently available to VM Support Members (http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail)
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: cornelius123 on August 27, 2014, 21:32:58 PM
Upload default.php to /templates/templatename/html/com_virtuemart/productdetails
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: KHM on August 28, 2014, 08:37:07 AM
Surprising not to be believed when one have followed instructions given down to the minute detail.

I admit not to be a hard core developer, and on top of that very rusty with the methodologies and architecture of Joomla (been a few yrs since I used it last). But not completely lost, and thus can follow exemplified exercises and if nothing else hope to reproduce results.

But I am grateful for contributions, they helped me out and/or set the focus and find the right file. An override by the template in used clearly mislead me. 

The field with subsequent text as shown in previously submitted snapshots originated from a template, and under templates/templatename/html/com_virtuemart/productdetails I found the default.php had code in it forcing the text to display.

By commenting out the code section reflecting the text/fields it went away. I'll bring up the question with those who developed the template.

Thanks for the help :)
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: GJC Web Design on August 28, 2014, 11:46:31 AM
QuoteSurprising not to be believed when one have followed instructions given down to the minute detail.
ah  - there's the rub ... you didn't   ;)

QuoteWhen I don't need it ATM I comment out or remove the code from components/com_virtuemart/views/productdetails/tmpl/default.php  and use the edited fille as a template override.

If you tried this you would have discovered your template over ride already there... and....  ;)
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: KHM on August 28, 2014, 12:13:42 PM
No I misunderstood the term used which is why the extra loop. That would be the rub.

In any event, thanks to the guiding posts I managed to inch myself towards a solution and am grateful for help given. Next time I see the term override I know what to do.

End of story.
Thanks
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: Veter on August 29, 2014, 16:42:25 PM
Tell me please, can anyone know which file you need to translate this string into your language?
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: GJC Web Design on August 29, 2014, 17:32:32 PM
it is in the shipping plugin - if you use the weight_countries
plugins/vmshipment/weight_countries/weight_countries/tmpl/default.php  - last line
hard coded - tsk tsk
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: AH on August 30, 2014, 00:53:54 AM
2.6.8b

Setting is now in shipment method "Show on productdetails"

Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: Veter on August 30, 2014, 21:18:25 PM
Thank you very much!
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: AH on August 31, 2014, 00:19:29 AM
Thank Alatak and the Devs.

For some reason when you specify a country in a shipment method the Product details page does not display anything for shipment

If no country is set in the shipment method the Product details page displays the Shipment price.

Looks like a bug
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: GJC Web Design on August 31, 2014, 12:40:18 PM
can confirm this - noticed it yesterday when looking for the language - there is a country list loop in plugins/vmshipment/weight_countries/weight_countries/tmpl/default.php

if this did work and you had 100 countries enabled that would be quite a list....  ;)
Title: Re: Turn off "Shipment price display in product details" in 2.6.8?
Post by: AH on August 31, 2014, 20:51:31 PM
That is the issue with displaying shipment.

I agree that displaying a list of countries for which the rate applies is not so great
Plus the potential for a product to qualifiy for multiple shipment methods

Until the customer signs in or enters an address you have nothing to go on.

Our configuration would have mainland UK shipment methods for various weight boundaries
Each of these shipment methods would then be set to display on the product page
All other shipment methods would be configured to NOT display
The multi country issue would not be an issue

This is all really moot as we had already coded our own solution for the product page ( not release grade stuff - lol) before this appeared

It would be nice to use it though as I am sure it could bring a great deal of flexibility