I have a small problem. I need my Joomla site to show normal dates in an absolute way. I want it to say 'published on January 14, 2014' not 'published 3 hours ago' like it's now. I think template [Joomlart's Ja-Magz] has some overrides that I don't know how to remove, and they are really not quick with answering questions on their forum, so if anyone has any idea, it would mean a lot.
Depending on where the dates are showing up, you need to look at the these template override files -
For dates showing up in category listings: /templates/ja-magz/html/com_content/category/blog_item.php
For dates showing up on an article detail page: /templates/ja-magz/html/com_content/article/default.php
Related
I am using Python to query the Reevoo API. As far as I can tell, the options for filtering are somewhat limited and the docs are an exhaustive list of what query parameters you can use. I was wondering if anybody had found a way to filter customer experience reviews with a date range?
Currently my hack solution is to use a generator which calls the API page by page and yields the review if its publish_date is after a certain date, which is obviously really inefficient. It doesn't help that the API returns the results slightly out of order, so I can't break/return as soon as I find one review that's out of range.
for i in range(number_of_pages, 0, -1):
# API call wrapper
page_of_reviews = self.reevoo.get_customer_experience_review_list(self.trkref, older_reviews=True,
page=i, per_page=30)
page_of_reviews = json.loads(page_of_reviews.text.replace('\r\n', ''))
customer_experience_reviews = page_of_reviews.get('customer_experience_reviews')
processed_reviews = self.process_customer_experience_reviews(customer_experience_reviews)
for item in processed_reviews['review_list']:
if from_dt:
if datetime.strptime(item['publish_date'], '%Y-%m-%d') >= datetime.strptime(from_dt, '%Y-%m-%d'):
yield item
else:
yield item
I've scoured the docs and Reevoo's GitHub page and haven't found anything, but in the hopes that some random person on the Internet has found a workaround... Does anyone have any ideas?
I emailed Reevoo to ask about date filtering and the short answer is that there is no way to filter or sort by date.
Explanation from the email:
Unfortunately, we cannot filter reviews by date as when we display the reviews, they are not necessarily in date order. For example, reviews with written content come before those which don't have written content as they have more value to the consumer. We would also prefer that you refreshed everything at least once a day, because older reviews sometimes have to be renewed or customers may sometimes request that there reviews be amended.
I understand why you would lie to do date filtering but at the moment, if you are caching reviews on your server, this is the way we prefer you to do it.
I'm newbee in Opencart development, so help me please. Opencart version 2.1.
http://prntscr.com/dak2kf
http://prntscr.com/dak3xi
I want to change current discounts and specials to percent type.
What files i need to change for right showing in cart and order?
I changed controller of product, on products page price already right (42% discount), but to cart sending price without 42% discount, just 42 value.
Thanks a lot.
Our suggestion is to use jquery and convert the % to fixed price before saving it to the database.
This way Opencart functionality will not be affected and you will be able to set price for special deal with ease.
You can convert % to fixed price on blur from the input field.
});
I am using quite complex property bindings to be able to change either day, month or year of a user's birthdate. Having an attr birthDate of type date on a user and three properties for each piece of the date.
I am using moment.js to simplify date manipulations.
By trying the reduced showcase on jsfiddle you'll see that if you change year or day, the month is always increased by 1. I can't say what is happening. Just this: when setting the new date, the value is correct and gets changed later. Is there an issue with ember-data date attributes and some formating?
Again: here's the jsfiddle - written in CoffeeScript.
Thanks in advance!
I looked at your code and it looked like it should be working fine, the more I stepped through it the more I got annoyed that I couldn't spot the problem ... turns out it's the .month() method from Moment.js ... from the docs:
"Mutates the original moment by changing the month. Accepts numbers from 0 to 11"
Pretty dumb huh? In any case change your setMonth to subtract 1 from the value when you use .month()
setMonth: (property, value) ->
#set property, moment(#get(property)).month(value-1).format()
return value
Again a calculated field question, How can I create a calculated field to find out, what is the age of the entry.
In the list I will have a created date field, from that I would like to create a number field calculating the no of days from created day to today. I tried with =Today-Created, not working!!
Any inputs ? Thanks !!
Use the DATEDIF function:
=DATEDIF(Created,Today,"D")
UPDATE:
Because Today won't work (see comments below), the OP chose a completely different approach using XsltListViewWebPart.
Can anyone point me to the templates/code blocks that are used for the order totals block on the Magento order mail and invoice e-mail templates?
The tax issue is solved but I need to implement some logic to get rid of the shipping and the subtotal. Which templates are used for the emails?
I found the frontend and changed this as needed, but can't find the template/block that is used for the e-mails sent by the system.
Can anyone point me in the right direction?
Thanks,
Bart
Niels answer of app/design/frontend/base/default/template/sales/order/totals.phtml is correct however I thought some further clarification was in order because one doesn't merely make cosmetic changes to this file in order to effect the desired change. totals.phtml loops over the "totals", each of which produces a total-related line-item (Subtotal, Shipping & Handling, Tax, Grand Total (Excl. Tax), and Grand Total (Incl. Tax)). Your best bet is to use Mage::Log to output each of the totals (which are looped over via an associative array $_code => $total). If you log each key ($_code), you'll see names such as subtotal, shipping, grand_total, tax, and grand_total_incl. I filtered out those from the sales order e-mail that I didn't want by adding the following code directly below the foreach:
<?php if (in_array($_code, array('grand_total'))) {
continue;
} ?>
Hopefully this will help anybody who is puzzling over where these totals are mysteriously coming from. :-)
This template is being used for the totals in the e-mail templates and order overview in My Account:
app/design/frontend/base/default/template/sales/order/totals.phtml
Jason's answer is good for telling Magento to not generate the likes of grand_total HTML. However, you should look at System > Configuration > Sales > Tax to see if you can remove the fields the proper way first.
If you then see a message saying "Warning tax configuration can result in rounding errors" at the top of your admin pages, you'll need to adjust your settings. See the manual for the default settings, if you need them.
I am not entirely sure but could it be this one:
\app\design\adminhtml\default\default\template\email\order\items.phtml
Directory might not exactly match yours but I'm sure you would be able to find it.
HTH