Which view to edit

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #116098

Hi there

i do a research, but im still not able to find which view should i edit to change the posistion of parameters for products in category product listing.
I just need to change the position of price, put it below the product name and add a brand name to this product cart overview.

Could somebody help me please.

thank you.

Attachments:

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 4 months ago #116105

Hi,

It's the file "listing_img_title" of the view "product" that you can edit via the menu Display>Views

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

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #116209

Hi Thank you

And could you please help me find a code which will show a brand of product in this listing?
I try to ifnd it using inspect element feature of web browser + I checked the code of view product default_listing, but still nothing.
I cant locate the code to show the brand name.

thank you

DOminik

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #116235

Hi,

I think that you should just edit the "listing_div" file of your "product" view of your front-end template, and change these lines :

      foreach($this->rows as $row){
        if(!HIKASHOP_RESPONSIVE) {
?>
by :
$class = hikashop_get('class.category');
      foreach($this->rows as $row){
        if(!HIKASHOP_RESPONSIVE) {
      
if(!empty($row->product_manufacturer_id))
$manufacturer = $class->get($row->product_manufacturer_id);
echo $manufacturer->category_name.'<br/>';
?>

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

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #116303

Hi

I try code according to your advice, it shows the name of the brand but outside the card for each product, as you can see it on attached screenshot.
Any idea what am I doing wrong?

thank you

regards
Dominik

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #116354

Hi,

You can use the code given by Mohamed in the file given by Nicolas ;)

The code to use is:

$class = hikashop_get('class.category');
if(!empty($this->row->product_manufacturer_id)){
$manufacturer = $class->get($this->row->product_manufacturer_id);
echo $manufacturer->category_name.'<br/>';
}

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

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #116620

Hi great it works. Thank you.

And if I want to have the brand name to be URL which links to brand products? Like an a href to list of all products of this brand.

Could you please help me also with this?

thank you very much

best regards
DOminik

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #116695

Hi,

You have to create menu links to the brands categories.
In Joomla > Menu, create a hikashop type menu, "product listing" and in the HikaShop options select the desired brand (to access the brand categories you first have to click on "root" in the category tree).

The alias of the menu must contain the brand name.

Then in the file, replace :

echo $manufacturer->category_name.'<br/>';
By:
echo '<a href="/yourLink-$manufacturer->category_name">$manufacturer->category_name.'</a><br/>';
Where "yourLink" is the standard link and you set dynamically the brand name.

Hope this will help you.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum