I've moved the place input quantity in opencart 2.3 and now it does not make the right quantities count in the cart
product page quantity
cart quantity
Related
I have a product list and a shopping cart.
I add the products to the cart.
As the first item in the list of products added to the cart I want to view the last product I added.
How can I view the list of products added according to this order?
To simply explain, I have a model product with columns:
(Product model):
name
type
(Order model):
order
price
quantity
I am using the django built-in Paginator and the django-filter.
The paginator works so well and it really filters the items but the problem is, when the paginator is involved, the "Next" or "Previous" button I created will not work well to see the filtered items on the next or previous page because it reloads the whole template and the filter form will be erased.
Example:
I have mouse and keyboard as "choices" on the "Type" column of the product. I have 25 mice, and the paginator divides it by 10. I can filter the items and shows 3 pages for the mice but when I turn to the next page, the keyboard items will show because the filter form is reset. Any help or suggestion will be appreciated. I need to hear any thoughts for this.
Please help me to display the coupon code or coupon name in opencart 2.1.0.1 product page. For the promotion of products I need to display the coupons or promo code in the product page of opencart 2.1.0.1.
I think this will be hard coded, you will have to add a method to the copoun model which will take the product_id and return the copouns related to this product_id, then in the product controller you will need to call this method and list the copouns in a data variable, then in the product view you need to show them in the desired place.
I want to show original price and price after discount on cart page when discount is enabled in opencart .How to get this done?
In the product form where you add the discount there is an option of start date and end date look at that once.
Another thing is if that product has a special price already then discount price will not enable.
I have a design with twitter bootstrap front-end and django backend, and I want to make on a shopcart a "plus/minus" button to update quantity and price. How would be the best option to do this?
Currently I am using a form with 2 buttons and updating the quantity and price values within the view. If I use Jscript how can I update the session fields quantiy and price ?
I want to achieve this : http://bootsnipp.com/snippets/featured/buttons-minus-and-plus-in-input but when clicking plus/minus to have price updated according to the quantity values.
Javascript can be used to update the price based on the quantity.
Django only does updates when you submit data to the database. You can make a shopping cart object in the database of coarse and save what the User has selected in that cart. But for updates on the page for the price and quantity without submitting data to the database it would be Javascript.
I recommend using Javascript on the page for price and quantity updates, and then when they select an "add-to-cart" button, then to submit the data like any other Django Form, and save the data in a shopping cart for that User's session.
I think for your situation a simple jquery function for when quantity element is changed will suffice.
for example something like
$(document).ready(function() {
$("#quantity").change(function(){
q = document.getElementById("quantity").val()
p = document.getElementById("price").val()
t = p*q
document.getElementById("total").val(t)
});
});