msrp and price in content module

  • Posts: 55
  • Thank you received: 3
11 years 8 months ago #124819

-- 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.

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #124881

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:

&& $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.

  • Posts: 55
  • Thank you received: 3
11 years 8 months ago #125003

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.

  • Posts: 55
  • Thank you received: 3
11 years 8 months ago #125004

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.

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #125022

The module id is in: $this->params->get('from_module','')
So you can do:

if($this->params->get('from_module','') == '104') echo "stuff";

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

  • Posts: 55
  • Thank you received: 3
11 years 8 months ago #125027

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.

  • Posts: 55
  • Thank you received: 3
11 years 8 months ago #125028

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.

  • Posts: 55
  • Thank you received: 3
11 years 8 months ago #127938

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.

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #127961

Hi,

To display the msrp in the listing page, you have to remove

&& JRequest::getCmd('layout') == 'show' 
in the if conditions.

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

  • Posts: 55
  • Thank you received: 3
11 years 8 months ago #128072

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.245 seconds
Powered by Kunena Forum