osCommerce: custom price based on user input - oscommerce

I am writing a simple JavaScript which will update my price automatically (I know there are addons but they dont work with the nature of my products) when the user enters amount, size etc etc. I want to know how do I override the product price before/after it is sent to the shopping cart?
Example: The product price is 10€. The user select some variatons and then the price is 22,40€. I want to send that price to the checkout instead of the 10€.
So far I have written my JavaScript which updates the price based on user input and selections. I just need to know how to pass that new price variable and more important WHERE.
Any tips or help would be appreciated.

You mention "variations". Are you using attributes? If so, you can simply attach a price adjustment to each option value. That would be the quickest and most proper way to handle variation-specific pricing.

Related

Django: Handling discount codes

I am currently building a Django application where visitors can buy an online course. I now want to implement the possibility to provide discount codes. As these discount codes should be limited by quantity I now have the following implementation idea:
Guest visits www.page.com?discount=TEST
The model discount contains the fields discount_codes & max qty. I will check here, if the code exists. Also, I have to count all entries in my order model that used the discount code TEST. My order model contains the foreign_key field 'redeemed_discounts').
As soon the user clicks on Pay (via Stripe) I'll once again count all the orders in my order model which contain 'TEST' to make sure, the 'max_qty' is not reached meanwhile.
Now I can charge the visitor.
Would you consider this as good implemented or do you see any problems with the way I am planning to do it?
instead of using max_qty why don't you use something like use_left and max_use
so whenever someone uses that code you can reduce the count accordingly and when count hits zero you can stop using that with this approach you don't have to scan order table every time to see if the coupon code is still available.

In open cart 2.0.2.0 how to change the value passed to the cart?

I made some changes in this file catalog>view>theme>default>template>product.
I created a custom textbox where the price of the product changes according to the selection made in the select option.
http://webanddesigning.com.np/ocart/index.php?route=product/product&product_id=72&search=bara
but I cannot pass the selected price to the shopping cart. Any idea ?
Opencart does not pass price info to the cart. Price is calculated in the library cart class according to options, discounts, specials and other product data in your database. In your case it sounds like you need to either do this using native options or write a custom option method.

Opencart, Flat Charge for option (not related to Quantity)

I am having trouble with my order processing for Opencart 1.5.6. I have a series of checkboxes that if checked each cost $50.00. The problem is that the customer is ordering print materials in quantities of 500, 1000, 5000, etc. When they get to the shopping cart it charges the $50 extra for each option for each individual item ordered based on the quantity. This makes it so that their total skyrockets. If they pick one option for $50 and order 500 business cards they get charged an extra $25,000 for that one option.
The only solution that I can see is to have the Quantity be an option and only allow them to order one product but that does not allow them to change the Quantity of cards in the Cart.
Is there anyway to set it up so that an option charges a flat rate not based on total quantity of the order?
When customizing OpenCart follow these steps.
Look to see if this link has an extension that will do what you want.
If step 1 did not work. Go to your public_html file (the place that has all your code). Open the files that are related to your problem and edit those. There is also an OpenCart forum that will help with common problems.
As far as changing the settings on your payment function. Go look at OpenCart->catalog->checkout folder. Or maybe OpenCart->admin->checkout. You will need to find the function that adds quantity and gives value. You will need to change those around a little.

how to add "product filter by price " in opencart

i am trying to add product filter by price in opencart, So how to do this?
also add this featured in product page
Follow this steps you can easily add the Price filter for your open cart front end page
Filter I Category → Filter-->Insert--> add filter.
Give--> 1000,2000 and more.
Now Save Filters.
Filter II Extension-->Modules-->Click Filter.
Maintain with Column Left
Status enabled.
Filter III Catalog -->Products-->Click Edit
Go to Links-->Type Filter Amount
If Product Price 2500 ,then maintain the filter value price (2000 – 3000) Range.
Regards
Megala
In fact, it is unnecessary to add the price filter. It is possible to generate the price range filter automatically for products listing when the customer access any category in your store.
I use an advanced products filters module(include price range filter) for my store > http://www.myluvme.com/index.php?route=product/category&path=88_95.
It really help my customers focus in on what they are looking for which will create more sales.
The mod worked out of the box with the default theme and only needed some minor tweaks to work with my custom theme which the developer did for me immediately. i like that it builds upon the framework of oc.
It should be useful to boost your online sales too. I recommend you to try it. You could find it at:
http://www.ocaddons.com/product/opencart-module-advanced-products-filters-module-include-price-range
Unlike many other shopping carts there is no a built-in filter in OpenCart that could be considered a normal usable e-commerce store filter unfortunately. The OpenCart filters thing is a super clumsy functionality and it's not very clear for users how to administer it. In our company we use an extension called Brainy Filter http://www.opencart.com/index.php?route=extension/extension/info&extension_id=19184 They have it for both OpenCart versions but of course you should go with 2.x rather then the old 1.5.x one. All other filters we tried appeared to be either just junk or had very messy interfaces.

variable date option in opencart

1st I want to remove text field for date so the calendar will replace it.
2nd I want to make the status order.. I want to sell the service, so I need to make booking order by calendar. If the date is green client can make an order. If red the client can't book an order. If yellow there certain items can be ordered.
I hope someone can help..
Thanks.
You have to try something at least and ask only for advice then.
Anyway, few suggestions:
it cannot be done using that option field of type date, at least not with the default datepicker.
You will need to create Your own datepicker component that will search for free/partialy/fully ordered days in the database and color the table cells accordingly.
It is not very wise to hide the input - by this visible user could anytime check what date did he pick - if it is not visible he would need to always open the datepicker to check for it...
Disallowing to order some service based on some reservations is highly decreasing Your conversion rate - thus decreasing Your income. I would definitely go the way let the user buy/order anything at anytime while having separate reservation system. If user buys a service at thank You page I would recommend him to book a concrete date for the service to be drawn. Here You do not need to fight with product options which are meant totally for something different that You are trying to.
Keep that in mind (mainly the 4th point) and re-think Your problem.