Help with css and display views

  • Posts: 40
  • Thank you received: 1
12 years 3 months ago #60883

Hi Nicolas,

I've a few questions, please, about the editable css and 'Display - Views' files. There are several things I need to resolve and the main ones are below.

1. All of the products sold on the site I'm building are unique - it's very rare to have more than one of each, so I need to 'hide' the Quantity fields from the cart and checkout pages. I found (by accident) how to hide the 'in stock' quantities from the list and product items, but I can't work out which files require editing in the 'Display - Views' area, and more importantly, what edits to make. I don't want to make changes that will be overwritten by the next Hika upgrade.

2. With your previous advice on using the language file, I've been able to change the Price suffix from 'each' to a prefix of 'Price: '. However, while this is fine for listings and product page, I don't want it to appear in the cart or checkout - it breaks the layout and is redundant because the column is already headed 'Price'. Is there a way to make a second definition in the language file to cover both instances, eg. CART_PRODUCT and CHECKOUT_PRODUCT? Or have I missed something already in place?



3. I'd like to change the product page to look like the screenshot below - I've got so far with it but I can't work out how to move the 'Add to cart' button from above to below the specifications table, ranged right as shown.





4. I also would like to have control over the appearance of the new registration, shopping cart and checkout pages as defined in the screen shots below, specifically column and overall width, but I'm having difficulty identifying the correct classes (for example) to edit in the front-end custom file. I use Firebug to view the structure I'm trying to adapt and will usually make the changes in Firebug so that I can see they are exactly what I want.


But I often cannot then find the class in the Hika frontend css file. It's almost as if there are other style sheets in operation - I realise that the Joomla template style sheet will also have an effect, but all of the items I'm looking for are hikashop predicated - eg. ' class="hikashop_contentpane" ' and are not present in the Joomla template. I've also tried adding them myself, but no success so far.

Many thanks for you help with this.

Last edit: 12 years 3 months ago by badcoder.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 3 months ago #60967

Hi badcoder,

1. Go in HikaShop > Display > Content modules, edit the cart module, and check "No" for "Show quantities in the cart".

2. You can edit the view where the text appear, and change the text in "JText::_('THE_TEXT')" by "JText::_('YOUR_TEXT')", and then add YOU_TEXT="Your text" in the translation file.

3. Edit the view "Product / show_default" (or show_reversed / show_tabular, depending on which view you are using)
And place the code:

  <div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
    <?php
    $this->row = & $this->element;
    $this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this->row->product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }';
    $this->setLayout('quantity');
    echo $this->loadTemplate();
    ?>
  </div>
Just before:
<span id="hikashop_product_id_main" class="hikashop_product_id_main">

4. Try to add the property:
.hikashop_user_registration_page .hikashop_contentpane .key{
	// change the width of the first column
}

.hikashop_user_registration_page .hikashop_contentpane .inputbox{
	//change the width of the fields
}

You can use !important in your css properties to override the other properties. (color: #ffffff !important;)

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

  • Posts: 40
  • Thank you received: 1
12 years 2 months ago #61634

Thanks for the help Xavier, most of the changes are in place now. I have one problem remaining and a few more questions -

1. Re. my previous query about varying the languages 'price beginning' code, I made a second instance for the product listing and the product view. This worked fine, except that the code for the product cart references the listing layout and shows the price beginning from the listing view instead of the default value used by the checkout file. Checkout cart is fine. Any ideas as to how I can overcome this?

2. Can you suggest the best way to set up the search module with a keyword search and a drop-down pick list that can be used alone or in combination? I preferably would like a stand-alone sidebar module that simply carries those two items. I have set up various custom fields to be searchable following info from another post.

3. Can you tell me how to set custom fields to appear in the product listings. I read in another post that I need to set them to table 'item' which I can't locate - all products entered so far have been set to 'Product' and the custom fields display fine on the product page. I notice that there are other options on your demo site - 'Category', 'Item' and 'Entry'. Are they therefore only available on the Hika business option? Does this mean that if and when I do have the 'item' table option available, I have to enter all the products' custom fields again?

'As you can see, once a custom field is created, you can't change the table where it is located. If you want to do so, you will have to delete it and create a new one.'

. Is the 'Item' option available for both listing and product page or do they need to be duplicated?

4. Can I remove the 'Unit Price' column and 'Quantity' field from the checkout cart but leave the 'Refresh' and 'Delete' buttons in place, or at least the 'Delete' button? Can I set the column widths/layout for the checkout cart? The columns I require are 'Image', 'Title', 'Refresh/Delete Item' (formerly 'Quantity') and 'Price' only.

5. And when I call up a product list by category, the product list is displayed but with two instances of the 'Sorry, no products . . . were found.' message. If there are no products in the category, there are three instances of the message shown. What have I done wrong?

Thanks again for your help.

Last edit: 12 years 2 months ago by badcoder.

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #61780

1. You must be talking about the listing_price layout right ? That same layout is actually used for the listings, the product page and the cart product prices. In that layout, you can check if you are in the cart or not like that:
if(@$this->row->cart_product_id){
//in the cart
}else{
//not in the cart
}

2. The search system of Joomla cannot handle dropdowns, only the default text box. That's why we have made filters and the filter module which allows you to configure exactly that:
www.hikashop.com/en/support/documentatio...-filter-listing.html

3. item custom fields are only available in the Business edition.
Please note that the item custom fields are not the same as product custom fields. item custom fields are for the user to select something, enter text or upload files so that you can know what they entered for their order of the product. product custom fields are for you to select something, enter text or upload files so that you can make that information available on the product page.
There is indeed an option to display the custom item fields on the listing. But there is no option to display custom product fields of the listings.
But you can easily have product custom fields value displayed on the products listing by adding something like that:
<?php echo $this->row->CUSTOM_FIELD_COLUMN_NAME; ?>
in the file listing_img_title of the view product via the menu Display->Views. Of course, you need to replace CUSTOM_FIELD_COLUMN_NAME by the actual column name of the custom field.

4. You will have to edit the file "cart" of the view "checkout" via the menu Display>Views and remove the code corresponding to these columns.

5. I don't remember that we have such message in HikaShop. Can you give a link to these pages ?

The following user(s) said Thank You: badcoder

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

  • Posts: 40
  • Thank you received: 1
12 years 2 months ago #61801

Hi Nicolas -

Many thanks for the information, I'll see how I get on with your advice (I didn't choose the username 'badcoder' for no reason!).

Re, item 5 - I'll PM you a link to the page - the message is my replacement text for the standard 'no content' search result. (Sorry for the earlier version - well it is getting late!)

Thanks again,

Mike.

Last edit: 12 years 2 months ago by badcoder.

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 2 months ago #61940

Hi,

That's because you had products listing modules associated to products listing menus. So below the products listing menu, you had a products listing module trying to display products which it didn't found.
Also, you had products listing modules published for no reason.
I've unpbulished them.

It's all working properly now

The following user(s) said Thank You: badcoder

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

Time to create page: 0.073 seconds
Powered by Kunena Forum