Products Listing Format Change

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19717

Hi,

I'm using Menu Item Type "products listing" showing "table" layout. Enclosed is what the page looks like. My queston is why is the table listing not showing up in one line. What I mean is why "12 spaces available" is showing up on the first line, and then description and the price and the "Register" button on a separate line (total 3 lines, instead of 1). I tried Display>View and looking at the PHP file for listing_table but I don't see anything that I can control the layout as described above.

Thanks,
-Jackson

Attachments:

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19732

That's because there is a clear between the stock and the button. You should be able to have it all on one line with some CSS.
If you can give the link to that page we should be able to tell you what CSS to use.

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19740

I'm assuming you want the link to the website? Here you go!

logoslearningadventures.com/index.php?op...t=listing&Itemid=233

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19742

So, the right column is displayed by the quantity file of the view product. That same view file is also used to display the stock & button on the product page.
The two <br/> which make them display on two lines are in that code of the file:
echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';
$config =& hikashop_config();
if($config->get('button_style','normal')=='css'){
echo '<br />';
}

If you remove the <br /> tags there, then you can just add some CSS:
.hikashop_product_add_to_cart_row{white-space:nowrap;}
and everything will be on one line on your listing.

However, the stock & button will also be on one line on the product page if you just remove the br tags. So instead you should have a check like that...:
if(JRequest::getVar('task')=='listing'){
//no br
}else{
//display br
}

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19743

Nicolas,

I can't find the info. you are describing in the "listing_table" view file. Which one should I use?

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19745

it is not in the listing_table view file but in the quantity view file as I said in my previous post.

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19748

Awesome! It worked!

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19825

Hi Nicolas,

Sorry to bother you again (I'm a novice of PHP). Now for the product page, I'm showing the price under the product name and then Register (add to cart) and then the availability quantity in a separate line (see attached).

I'd like to have the price, inventory, and then the Register (add to cart) all in one line.

For example,

$64.00 /session 12 spaces avail. [Register]

Instead of what's showing now. I know I need to change it at the "Quantity" view. Please advise.

Attachments:

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19827

Your website is not accessible so we can't check on that.

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19831

Nicolas,

please use:

U: guest
P: nicolas

and use this link:

logoslearningadventures.com/index.php?op...3&category_pathway=0

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19832

You first need to edit the file show of the view product and remove the <br/> tag after the hikashop_product_price_main block.

Then you can add some CSS in your hikashop css file (via the interface in the Display tab of the config):
.hikashop_product_price_main, .hikashop_product_quantity_main {
display: inline-block;
}
.hikashop_product_stock_count{
float: left;
}

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19834

Awesome! It worked. The only thing now is that they are displaying too close to each other (no spaces). No big deal :)

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19835

Nicolas,

Sorry to bother you again, can you help me with the spaces between the price, product stock count, and register (add_to_cart) and also add an extra line or two after the [Register] so that the body of the product description is not too close to it.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19837

You can use that CSS:
.hikashop_product_stock_count {
margin-left: 6px;
margin-right: 6px;
}
.hikashop_product_bottom_part{
padding-top : 10px;
}

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19838

Awesome! Once again, Nicolas delivers... :)

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

  • Posts: 20
  • Thank you received: 0
13 years 5 months ago #19842

One more question on the formatting of the product page. Is there a way to either to show the price, stock count, and add-to-cart button to the right of the page or before the product name? This way, the product name and the product description can flow better without being interrupted by the price, stock count and add-to-cart button.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19843

Sure. You need to edit the file show of the view product and move the hikashop_product_name_main block just before the hikashop_product_description_main block.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum