Giter VIP home page Giter VIP logo

wc-price-history's Introduction

Hi there 👋

wc-price-history's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wc-price-history's Issues

Creating new products via duplicate - addon shows duplicated product price on new product

Hi there,

First of all thank you for this wonderful addon!
Secondly I have some issue and would like to know if there's a workaround.
Since I have a custom template for products, I generally just duplicate product and change the txt/pictures/price and publish it..
But it seems that the addon is picking up the initial price when the product was duplicated prior to publishing it and now when I try to put the discount price it posts the price from the initial duplicated product.
Any thoughts on how to solve this? since I don't have a blank template (the one without the pricing on it) and that wasn't published.
Thanks in advance!

Update - fatal error

I've just updated the file. It caused a fatal error. I received a message from Wordpress that there is a mistake in the new version of the plug. Is it going to be fixed? When?

"Day before product went on sale (excludes promotional price)" not working as expected

How the project is setup:

All products on the store are variable. The variation sale price gets update only via REST API, all sales are always timed (they have start and end date set, time portion of datetime is always 00:00).
We also update the stock on a daily basis via the REST API.

The issue:

We have selected the "Day before product went on sale (excludes promotional price)", on the day of the sale this works correctly the previous day's price is shown, but the next day the minimum price becomes the current sale price.

Investigating the code:

Looking through the code (WordPress and WooCommerce are not my primary environments, so I could be off).

First the condition $timestamp >= ( $sale_start_timestamp - ( $days * DAY_IN_SECONDS ) ) && $timestamp <= $sale_start_timestamp located in HistoryStorage::get_minimal_from_sale_start also includes history data of the day the sale started.

And this might be an issue because of ProductUpdates::update_price_history that gets triggered on woocommerce_save_product_variation hook. I assume this hook also gets triggered when we update the variation stock? If that is the case the price history will contain the reduced price and with that condition, which I mentioned before, it will pick it up when displaying the lowest price.

Add shortcode

with attribute for product id


Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue description (features with more reactions will get higher priority)

Lowest price displayed without tax in spite of WooCommerce settings

I've noticed that the lowest price (using the shortcode) is displayed without tax, despite the following WooCommerce tax settings:
"Prices entered with tax" -> "No, I will enter prices exclusive of tax"
"Display prices in the shop" -> "Including tax"
"Display prices during cart and checkout" -> "Including tax"

Behavior:
The price is displayed without tax

Expected behavior:
The price is displayed with tax included

Relevant package versions:
WooCommerce 7.3.0
WC Price History 1.6.1

First price change: store "old price" also with the past date

Reported here:

https://wordpress.org/support/topic/display-current-price-not-price-of-the-last-30-days/#post-17396239
and here
https://wordpress.org/support/topic/display-current-price-instead-of-price-from-30-days/
and here
https://wordpress.org/support/topic/minimalna-cena-przed-obnizka/

If user installs the plugin, and then changes the price by starting promotion or any other case, curently plugin will save old price and new price separated by one second.
But because there no older price entries, the settings "track prices before promotion start" does not work: there is no older price, so plugin displays promotional price as the lowest one in the last 30 days.

The fix is to check if the price change is going to be saved for the first time and if yes, save old price also with a date one day before.

Checklist
  • Modify app/PriorPrice/HistoryStorage.php1cf51e5 Edit
  • Running GitHub Actions for app/PriorPrice/HistoryStorage.phpEdit

Check if wc is installed


Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue description (features with more reactions will get higher priority)

Make possible to not display 30-day low price

Cases:

  • allow to display it only if the product is on sale
  • make possible to not display on products list pages (only on single product page)
  • ...other cases (add in comment please)

Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue descriptions (features with most reactions will get higher priority)

Wrong number of decimals when displaying the lowest price

The lowest price is displayed in the format of 77,2zł instead of 77,20zł. That's with the number of decimals in the WooCommerce currency settings set to 2. The currency settings, including decimals, seem to be ignored. For the record, this is using the shortcode, but this seems like a more general bug with regards as to how prices are displayed.

Expected behavior:
The price is displayed according to WooCommerce currency settings.

Relevant package versions:
WooCommerce 7.3.0
WC Price History 1.6.4

[Feature request] make \PriorPrice\Prices::is_correct_place filterable

Describe the solution you'd like

from here:
https://wordpress.org/support/topic/najnizsza-cena-nie-pojawia-sie-na-listingu/#post-17031233

product price is not displayed on divi store page because it does not meet any criteria from \PriorPrice\Prices::is_correct_place filterable

solution: add general filter to this method so site owners will be able to adjust the method result and make it displayable in custom places


Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue description (features with more reactions will get higher priority)

WPML / Translation Friendly

WPML Can't find a string for the message, so cannot be used on multilingual websites :(
or maybe it can be used, but I don't know how?

[Feature request] scan products being on sale and start tracking

Describe the solution you'd like

it should be possible to track prices for product being set on sale BEFORE plugin installation/activation

Steps to see the problem

  1. user has site with products being on sale
  2. user activates plugin
  3. now he has to go to each product and resave it to have price tracking started
  4. there should be some option like "scan products on sale and start tracking the price history"

Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue description (features with more reactions will get higher priority)

Handle dynamic price discounts

handle other cases than setting discount in standard Sale field.

This will require user input with the info what kind of dynamic discounts they use.


Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue descriptions (features with most reactions will get higher priority)

First plugin activation - scan products and save first price history, also for a day before.

If the user activates the plugin for the first time (it will be known if we check get_option( 'wc_price_history_settings' )['first_history_scan'] is not set or the value is 0 and in wp_postmeta the is absence of any single row with meta_key = _wc_price_history ) display admin notice saying it seems to be the first activation and propose the user to scan products to start saving products price's history. The notice should not be able dismiss.

Other options for first_history_scan:
1 - in progress
2 - done

When use click the button to start the scan, redirect him to a new settings page in menu Woocommerce > Price History > First Run and start scanning products using ajax.

In the batches of ten products, check if they do not have wp_postmeta with meta_key = _wc_price_history and if not:

  • save the current price in the history for the day before the plugin was installed (today)
  • save the current price in the history for the day when product has been created

While scanning, display progress bar on this site. When the full scan is done display the info about the end of the process and propose user to be redirected to Woocommerce > Price History to do the plugin setup.
When the scan is started and still in progress (there are still products without wp_postmeta with meta_key = _wc_price_history), update first_history_save_done to the value of 1. When the scan is done update this settings to the value of 2.

When working with first_history_save_done setting, use PriorPrice\SettingsData

When working with product history, use PriorPrice\HistoryStorage

Checklist
  • Modify app/PriorPrice/SettingsData.php8c58109 Edit
  • Running GitHub Actions for app/PriorPrice/SettingsData.phpEdit
  • Create app/PriorPrice/FirstRunAdminNotice.phpd62f13f Edit
  • Running GitHub Actions for app/PriorPrice/FirstRunAdminNotice.phpEdit
  • Create app/PriorPrice/FirstRunSettingsPage.phpcfee0f5 Edit
  • Running GitHub Actions for app/PriorPrice/FirstRunSettingsPage.phpEdit
  • Create app/PriorPrice/AjaxProductScan.php6f5c578 Edit
  • Running GitHub Actions for app/PriorPrice/AjaxProductScan.phpEdit
  • Modify app/PriorPrice/HistoryStorage.php3a60512 Edit
  • Running GitHub Actions for app/PriorPrice/HistoryStorage.phpEdit
  • Modify app/PriorPrice/Hooks.php8cbd241 Edit
  • Running GitHub Actions for app/PriorPrice/Hooks.phpEdit

Fix: do not copy history on product duplicate

steps:

  • create a new products, set price to 300
  • go to list of all products
  • click option duplicate under the product
  • open duplicated product
  • set price to 500
  • open duplicated product in front end
  • bug: it shows the lowest price was 300

Price chart

Describe the solution you'd like
Time based price history chart

Steps to see the problem
A schortcode which would display a line chart with price history.


Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue description (features with more reactions will get higher priority)

Polish translation


Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue description (features with more reactions will get higher priority)

issue with price when using [wc_price_history]

Hello,

first of all, thanks for the excellent work with the plugin =)

I found the issue with displaying prices when using shortcode [wc_price_history].

My settings in woo: 12,90 €
[wc_price_history] is displaying: 12.9 € -> with a dot . and without 2 decimals.

Thanks
Simon

Rewrite to store history in custom field


Hint: Are you waiting for the same feature to be implemented? Please react with ❤️ to this issue description (features with more reactions will get higher priority)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.