spree ecommerce set minimum order amount for cart - ruby-on-rails

We want to define a minimum order value. If line items total less than $500, it will show up error message when customer click on "checkout" button. Can we be able to find this setting under config for admin account?

Looks like spree doesn't have the minimum order value as configurable. You need to add some custom code to achieve this. Check this gist for an example of custom code.

Related

What kind of hook can I use if I want to change my custom price on Woocommerce bulk edit page?

I created custom price for WC_Product, put them into WC Bulk Edit Page and want to save changed values to disk.
I have seen class WC_Admin_Post_Types (woocommerce/includes/admin/class-wc-admin-post-types.php) and found there some kind of hooks.
I tried to hook `woocommerce_product_bulk_edit_save', but this trigger does not work (or I did something wrong there).
I did find examples in WWW, but then I shall create and use wp_ajax_{something} and 20-30 lines JS code.
May be exists another way for this - my custom price needs all the same as native WC price - where can I see how they are handled and save?
I was able to connect my custom function to hook `woocommerce_product_bulk_edit_save': this hook run if any of native Bulk Edit Fields will be filled, but I filled my custom field only. All should be fine. Thanks if you read this).

Magento rewards cart does not return the total points to be spent

I have integrated the Magento rewards program to be the main currency insted of money. Users have to earn points and spend them as the methhod of payment for all products.
Currently I am experiencing an issue where the User tries to add items to the cart, it allows to add items over the value which could be spent.
ex :
Current points = 20000
Cart value = 22000
But when I go to back end and save the product again it works fine and trows the message "Not enough points to check out".
Tried all the various things clearing cache, re-indexing, updating product programatically etc. nothing works.
you could try using the controller_action_predispatch_checkout_cart_add event to add a observer which would check if the points available is greater than the points required to buy the product, if it is not you could prevent the product from being added to the cart and show an error message to the user.
If it is possible to add your code to the question I would be able to provide a better solution to your problem.

price is not change based on product attribute prestashop 1.6.0.9

I am facing issue on my store.
I have Prestashop 1.6.0.9 Version on my product detail page.I have different attribute like color,size etc.Product price is not change based on attribute.
Can anyone have solution?
If u change combination and price still the same you should check your_theme/js/product.js and also check id="our_price_display". Maybe u have changed your code in tpl file and now Jquery cant find our_price_display?

Adding Custom Fields In orengehrm

I would like just to ask if anybody there has a knowledge in increasing the available custom fields in orangehrm. The default would be 10 fields but what I need is more than 15 fields to meet the requirement. I have tried to change the MAX_FIELD_NUM into 15 from the file PluginCustomField.class.php. The problem is that it still accept only 10 fieldd.
Please anyone there help me. Thanks a lot.
Instead to using custom field, why do not you create specific field in specific section. For example create a salary review field in salary section,
Checkout following link
http://forum.orangehrm.com/viewtopic.php?f=6&t=18413&sid=fa8d38e5b5825097a6299ef534636c93
You need to change all this positions.
There where you see Cutsomfield 10 as last, you need to add more. and instead of 10 put number you want.
/dbscript/dbscript-1.sql
/symfony/apps/orangehrm/lib/model/admin/dao/CustomExportDao.php
/symfony/data/sql/schema.sql
/symfony/lib/filter/doctrine/base/BaseEmployeeFormFilter.class.php
/symfony/lib/form/doctrine/base/BaseEmployeeForm.class.php
/symfony/lib/model/doctrine/orangehrmPimPlugin/base/BaseEmployee.class.php
/symfony/plugins/orangehrmPimPlugin/config/doctrine/schema.yml
/symfony/plugins/orangehrmPimPlugin/lib/dao/EmployeeDao.php
/symfony/plugins/orangehrmPimPlugin/lib/dao/CustomFieldConfigurationDao.php
/symfony/plugins/orangehrmPimPlugin/lib/model/doctrine/PluginCustomField.class.p
hp

Amazon add-to-cart url parameters

Ok so Im already an affiliate of amazon. I'm dynamically generating links based on results from their API. Im trying to put the customer in front of a permission to add an item to their cart. I have this structure as an example:
http://www.amazon.com/gp/aws/cart/add.html?AssociateTag=your-tag-here-20&ASIN.1=B003IXYJYO&Quantity.1=2&ASIN.2=B0002KR8J4&Quantity.2=1&ASIN.3=B0002ZP18E&Quantity.3=1&ASIN.4=B0002ZP3ZA&Quantity.4=2&ASIN.5=B004J2JG6O&Quantity.5=1
This works great as long as Im selling amazon-only products. What Im trying to do is put them in front of the lowest price for that product (items that are being sold on amazon by other people/dealers).
I already have the lowest prices etc etc. The problem is structuring the link to get them there. Do any of you know the parameters in the url that I would add or at least a list of parameters I could sift through to find what Im looking for?
Also, if theres a way to just put the item in their cart as apposed to taking them to a permission to add to cart...that would be that much better!
Thanks in advance!
Please refer to the documentation for forming an associate URL:
https://webservices.amazon.com/paapi5/documentation/add-to-cart-form.html
The "Add to Cart" form enables you to add any number of items to a customer's shopping cart and send the customer to the Amazon retail website for completing the purchase. Some parameters are optional, but you must specify quantity and at least one of the following parameters: ASIN or OfferListingId. AssociateTag is a must for attribution. You can either use this Online Amazon Add To Cart Link Generator To Easily Generate Add To Cart Link Without writing attributes by yourself or you can do this manually just like this:
"ASIN.1=[ASIN]&Quantity.1=1&ASIN.2=[Another ASIN]&Quantity.2=10"
Your final Link May Look Like This:
https://www.amazon.in/gp/aws/cart/add.html?AWSAccessKeyId=leNM%2FocHLQ%2ByqCuwtsgoza8buGoeRSlHuoDGRnlb&AssociateTag=ajaykumar9207-21&ASIN.1=B07CQ6Q52H&Quantity.1=1&ASIN.2=B07CQ6Q52H&Quantity.2=1&ASIN.3=B07CQ6Q52H&Quantity.3=1&ASIN.4=B07CQ6Q52H&Quantity.4=1&ASIN.5=B07CQ6Q52H&Quantity.5=1

Resources