Nopcommerce change shipping rules code - shopping-cart

I am using nopcommerce a open source shopping cart system. I want to change the shipping rules i.e. if any one buy a product of less than $1000 then he must pay a shipping charges of rupee $10 otherwise no shipping charges will apply. i want to do this through code. please help me.

You should create a new shipping rate computation method plugin. Please have a look at IShippingRateComputationMethod interface. Put all required logic into 'GetShippingOptions' method.

Nopcommerce has provide a new plugin for shipping rule "Shipping.Director" where you can write your own Expression for shipping you should try that one reference link
http://www.noptools.com/

Related

Should I use a Model or Not for my Rails App?

I'm new to RoR and hope I'm not in over my head here. So I currently have a user, product and 'order` models. My site just to give some context would be like using a paid Craigslist. You pay Craigslist upfront a flat fee (order), and then you can create your listing on their site (product).
My question is the flat fee portion of the site (let's call it packages) and whether to use a model or not? Currently there are 3 packages with 6 options. (eg - A $10/mth or $100/yr, B $20/mth,$200/yr, C $30/mth, $300/yr)
I assume if a model is not used, some type of JS is probably used, which I'm not super comfortable with yet. Any thoughts on what would be the best practice approach to this is appreciated.
I ended up going with setting up a MVC and seeding the database with the fixed prices for each package. Then in the create form, I added a hidden_tag that identified which package price should be passed to the Charges model to effectively charge the right price depending on the package chosen.

Magento communicating with another system

I'm building a magento (1.9CE) store which needs to interface with another system and I could use some guidance.
Although not particularly relevant, I'm communicating with the 'other' system using web services (it's on another server) but what I need help with is finding the places where I need to put in code to do what I want.
There are three major functions that I need to implement:-
When a user clicks on the product detail page I need to make a call to check the stock levels on the other system, update the magento stock levels and THEN display the product detail page.
When a sale is completed, I need to send details of that sale to the other system.
When a new product is added I need to communicate with the other system. This may be a bit more complex because there are a few checks I need to do during the 'add product' process, for example, check the SKU is valid, that tghe product doesn't already exists, etc. I think until I start coding this I shan't realise the full extent of this functionality!
Any guidance gratefully received!
Even though this might (and probably will) dramatically slow down your store, if you want real-time information, I guess the easiest way would be with observers.
You can use catalog_controller_product_init_before: This will trigger when the product detail page is starting loading, so you should be able to upload the stock at this point, before the page has finished loading, so that if there is no stock it will not be buyable, which I guess that's what you want.
You can use sales_order_place_after: This will be triggered after a new order has been placed and saved in the database.
You can use catalog_product_new_action or catalog_product_save_after: Depending on how you create your products the first one might not be triggered. The second one will always be triggered once a product (new or existing) has been saved, so at this point you will need to check if the product is new or existing, and do your stuff depending on that.
For an example of how to create an extension and usage of observer events, check this out.
I hope it helps!

Free shipping by number of items, not monetary value, in Bigcommerce

I've been asked by a client to look into the possibility of allowing free shipping for orders of more than three items. Essentially this means allowing for a (shipping) pricing structure based on item count rather than total value.
(For a TL;DR, you could probably stop with that problem statement, but I'll provide some solution investigation context below. Maybe I've missed something.)
The admin UI only allows for setting free shipping based on monetary value. Similarly, the "Ship by" category of price options adds the ability to use weight in calculations, but alas not item count.
There seems to be no way to influence the shipping cost through the API. A %%GLOBAL_ShippingPrice%% variable is available to templates and, as I understand things, is calculated only using those admin-configured shipping configuration options described above. The Shipping API only seems to deal with shipping methods (physical not API methods!), and unfortunately the Orders API seems to offer nothing related to shipping costs either. Hmm.
I've looked into hacking the template files, but cannot find any support for custom expressions using the variables available.
We've asked Bigcommerce support, submitted an "idea", and obviously searched the interwebs and poked around the developer documentation. I'm so new, I only heard about Bigcommerce yesterday.
Any suggestions will be greatly appreciated.
Note: First draft of this question included an inline screenshot and lots of relevant hyperlinks. Seems important for a quality question. Apparently I need more karma to insert most of that. I'll edit this question later, if possible and I ever get there, to include those helpful features.
Since Bigcommerce is not an open source platform, you cannot adjust things like shipping services and their actual functionality.
The only workaround I can think of would be to set every product to the same weight(1lb, for example) then set up shipping by weight which says cart >= 3lbs ships free. This will present a problem if you are using real time quotes from providers such as FedEx, USPS, or UPS though.
In the future I would suggest looking at their community forum(forum.bigcommerce.com) for questions such as this, since it does not actually pertain do the development of their API or templating system.
Best of luck!
This is possible if you use ShipperHQ. Here are the steps to configure it:
In ShipperHQ, ensure you have your UPS Carrier set with UPS Ground as
an available shipping method.
Click on Filters on the navbar and add
a new filter.
On your new filter, select “Whole Cart” under Filter
Applies To in the Edit Filter panel and enter a Name you’ll recognize
(e.g. “Over 3 items”).
In the Standard Filters panel, select “Range”
for the Quantity filter, enter a Min value of 3 and check the No Max
checkbox and Save.
You now have a filter set up which will match
against an order total with more than 3 items.
Click on Carrier
Rules on the navbar and add a new Rule.
Enter a descriptive Name
(e.g. “Free UPS Ground over 3 items”) under the Overview panel and
select UPS Ground in the Live Shipping Methods Assigned field under
the Applicable Shipping Methods panel.
In the Conditions panel,
select the Filter you just set up under Weight/Price/Quantity Filters
In the Actions panel and the Rule Action section, choose
“Set/Surcharge Shipping Methods” from the Action to Perform
drop-down, “Set Rates” from the Adapt Shipping Rates drop-down, and
“Per Cart” in the Apply Shipping Rate/Percentage drop-down.
In the
Set/Modify Shipping Rate section of the Actions panel, enter 0 in the
Shipping Rate field.
Save your rule.
ShipperHQ will now set UPS Ground to Free if the order has over 3 items.
Source: http://docs.shipperhq.com/how-to-set-up-free-shipping-for-orders-with-more-than-x-amount-of-items/

Satchmo Shipping Module Order Information

In my shipping module I'm trying to check the payment type and only return true for valid() if the payment type is not COD. Basically, I only want to give shipping choices of Local Delivery or Local Pickup if paying by COD and not allow actual shipping methods.
My problem is that in the valid() method of the shipping modules I don't know how to access the current order information. Is there a way to have the order information passed in to the init call? Or some other way to look it up?
After some more research I found a signal
shipping.signals.shipping_choices_query
This allowed me to filter the shipping options that are displayed.

changing locations in django satchmo

I am using Satchmo(skeleton project that comes in the projects folder when you download Satchmo) but am not in the US. I see that by default there is a Zipcode/Postcode* and list of states on the checkout page.
My question is, is the best way to change this(location details, billing information) to edit the /satchmo/apps/satchmo_store/shop/models.py file (hard edit the Order model)
or is there a better way to maybe set your location to a place other than the USA?
The reason I'm asking is because I'm not sure what implication a change like this might have throughout the skeleton project if I just deleted the zip code column.
Thanks.
go to /admin/l10n/country/ and mark the appropriate countries as active
go to /admin/shop/config/, select the site (probably localhost) and set the default shipping country and possible shipping countries
if you want to control whether the state and ZIP are requred or not, go to /settings/ , select "Satchmo Shop Settings" and modify "Required billing data", "Required shipping data" and "State required?" settings.