Layout questions

  • Posts: 279
  • Thank you received: 1
8 years 10 months ago #225336

-- url of the page with the problem -- : www.digitalguarddawg.com
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : None

A client using HS has asked me to make some layout changes to, mainly, the generated invoices. I have looked at the invoices in Display--> Views, but PHP may as well be Greek to me! :-)

Please see the attached generated invoice.

1. The ZIP code is shown before the City. Perhaps in Europe this is correct, but, here in the USA, it is not. The ZIP code should be shown AFTER the State. I really have no clue where to define this as the invoice just calls the HS placeholder for the 2 addresses.

2. No email address is shown anywhere on the invoice at all. I found this line in one of the emails - echo "\r\n\r\n".JText::_('HIKA_EMAIL').': '.$data->customer->user_email[0]; - would adding this under the Billing Address" fieldset add the email address to the invoice?

3. The "1 (= $35.00) on the first line of the invoice is for an extra Fob. I suspect that, because it's a characteristic it's cost is being added into the base cost. It would be nice to have this broken out as a separate item - perhaps in the same line as the base item (DGD-KIM-U) rather than a full separate line like the Accessory Switch. I have since added "Extra Fob" after the "1" so it may read better now anyway. However, the client asked if the dollar value is able to be shown in the "Unit Price" and "Price" columns.

4. Refer to Invoice Email. This is the email sent to the client and admin. You'll see that images are inserted and are really screwing with the layout, making everything on the left slide down and not line up neatly with the right hand items. If images must be on in these emails, can we line up the text? Or, alternatively, can we turn the images off? Also, as per #3 above, is it possible to break the characteristics costs out?

5. www.digitalguarddawg.com/kim-plug-play-k...s-ignitions/yamaha-t - there is a Characteristic of Model & Year. It says required, but I don't know of a true way of making it required. The client says many people miss doing this and that requires a phone call to check with the purchaser. How can I make this truly a required field and have the "Default" blank so that customers are forced to select their model and year? My client would also like the info from this field to appear somewhere on the invoice that goes to their customer and them.

Thanks and Happy New Year!

Attachments:
Last edit: 8 years 10 months ago by trogladyte.

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
8 years 10 months ago #225362

Hi,

1. Edit the file "address_template" for both your backend and frontend template via the menu Display>Views and move the tags in the order you want. No need to know PHP for that.

2. The email address is indeed not in the invoice. As you're apparently using the PDF invoice plugin, you need to edit the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php file via FTP and add such code:

<?php echo $order->customer->user_email; ?>

3. You can turn off the "group options with products" and that way options will be on their own lines on the invoices. The problem is that you won't know which option is for which product if you do that, so I don't really recommend that.
Otherwise, if you want to do something different, you would have to edit the invoice.php file with custom code. In that case, you'll have to contact a third party developer in order to help you with that as it's not just 1 or 2 lines of code to add and will require to spend to time to write the code.

4. Images can easily be turned off. Edit the emails via the menu System>Emails, and remove the image tag in the HTML version. Again, there is no PHP code there, only HTML and tags, so it should be easy to find.
For the lines break down, it's the same as point 3.

5. Edit the "please select" variant of the product and set a quantity of 0. That way, the add to cart button will be removed when that variant is selected. Also make sure that the "display out of stock products" setting is activated in the HikaShop configuration or the variant won't appear in the dropdown if its quantity is 0.

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

  • Posts: 279
  • Thank you received: 1
8 years 10 months ago #225392

Thanks Nicolas - fast and very detailed reply - even **I** could follow it! :woohoo: Have a great New Year!

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

  • Posts: 279
  • Thank you received: 1
8 years 10 months ago #226584

I added the email address to the PDF (thanks). However the client has asked for the email address, and the order date, be added to the HTML email body.

What is the code to do this please? Thanks.

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
8 years 10 months ago #226676

Hi,

For the email, you can edit it via the menu System>Emails.
There, in the HTML version, you can simply add tags like that:
{VAR:user.user_email}

For the date, you can do like that:
<?php echo hikashop_getDate($data->cart->order_created); ?>

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

Time to create page: 0.064 seconds
Powered by Kunena Forum