Skip to main content

msrp and price in content module

More
13 years 1 week ago #124819 by netpastor
-- url of the page with the problem -- : new.amothersart.com.au/Products-listing/product/listing.html
-- HikaShop version -- : 2.2.1
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3

So - what I would like to achieve is in the "grab a bargain" hikashop content module to show both the msrp price as well as the discount / normal price; with the msrp price with a strikethrough.

Looked to go into an ovverride of the module - but looks like the module is not built with normal Joomla overrides in place; not is their a function to create and apply an alternative layout.

Wondering where I find both the code, and the best way to create an ovveride for this one.

Ta

ian

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

More
13 years 1 week ago #124881 by Xavier
Hi,

You will have to override the view "product / listing_price", in this code you will see that the MSRP is not displayed in the modules thanks to the code:
Code:
&& $this->params->get('from_module','') == ''
So you have to create your own if condition to display the msrp with a strikethrough in the module.

The both modifications needs to be made in the same view.

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

More
13 years 1 week ago #125003 by netpastor
Thanks - that makes sense - and have proved what you're suggesting

i am thinking that the conditional statement that it needs to be is related to the id number of the module concerned (as it is really just for a single instance of the content module; but I am not sure what syntax to use, as it is not as if it is a position, or module type.

suggestions?

ian

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

More
13 years 1 week ago #125004 by netpastor
this one doesn't seem to do it
but wondering if it isn't for Joomla 3

if ($module->id == 104) echo "stuff";

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

More
13 years 1 week ago #125022 by Xavier
The module id is in: $this->params->get('from_module','')
So you can do:
Code:
if($this->params->get('from_module','') == '104') echo "stuff";

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

More
13 years 1 week ago #125027 by netpastor
brilliant

new edited line

if((isset($this->row->product_msrp) && @$this->row->product_msrp > 0.0 && JRequest::getCmd('layout') == 'show' && $this->params->get('from_module','') == '') || $this->params->get('from_module','') == '104') {

thanks
Ian

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

More
13 years 1 week ago #125028 by netpastor
actually this is better as it only shows then when there is an msrp price listed

if((isset($this->row->product_msrp) && @$this->row->product_msrp > 0.0 && JRequest::getCmd('layout') == 'show' && $this->params->get('from_module','') == '') || @$this->row->product_msrp > 0.0 && $this->params->get('from_module','') == '104' )

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

More
12 years 11 months ago #127938 by netpastor
wondering if there is a simple edit to achieve the same on the product listing page
cannot seem to find a simple flag to turn this on in config

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

More
12 years 11 months ago #127961 by Xavier
Hi,

To display the msrp in the listing page, you have to remove
Code:
&& JRequest::getCmd('layout') == 'show'
in the if conditions.

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

More
12 years 11 months ago #128072 by netpastor
Ok
sort of works
I now get a double up of the PRODUCT_MSRP_AFTER words echo'd twice on the product page
ian

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

Time to create page: 0.218 seconds
Powered by Kunena Forum