If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
Is there any way to dynamically set a products price?
I can understand the use of a form field in terms of a donation page and correct me if I'm wrong, but I believe allowing the price to be set in a form field could lead to misuse by someone easily changing the value of that field. If memory serves, this was something that had to be corrected in Miva itself many, many moons ago.
true. depends on how you are managing the payment information and how close you can keep an eye out for miscreants.
in this case, i'd use a module like Kent's. while it can be done at the SMT layer, it probably shouldn't.
I can understand the use of a form field in terms of a donation page and correct me if I'm wrong, but I believe allowing the price to be set in a form field could lead to misuse by someone easily changing the value of that field. If memory serves, this was something that had to be corrected in Miva itself many, many moons ago.
I'm checking out the donation module, and I'm wondering if I can use product attributes with it? I see that it comes with its own dropdown that can be added, but I'd like to use more than that. For example, I have a text box attribute called width added on the sku, and so I removed the
<input type="hidden" name="Product_Attributes:code" value="&mvte:mvdonate:donate_settings:attr_code;">
code from the donations form, and tried passing this through.
<input type="hidden" name="Product_Attributes[1]:code" value="Width" />
<input type="hidden" name="Product_Attributes[1]:value" value="123" />
But the option doesnt come through to the cart.
I tried that template code for the basket, but that wasn't exactly what I was looking for, the price of the product is going to change based on the options that are entered, using calculations on numbers that are entered, so the price groups or setting the price in the basket with the code isnt going to work.
Kent, I'll contact you about your module if the donations module doesnt allow for attributes.
I have a "universal pricing" module that may meet your needs. It can set a product price by doing any sort of calculation involving attributes, quantities, other items in the basket, customer identity, etc.
What template code can be used to update the price in the basket? I have toolkits upcharge applying some fees for some products on my basket currently.
The JSON api can work, but this sets the price for all shoppers not a single shopper/basket.
A couple other options:
1. Use persistent price groups to dynamically assign or unassign a shopper from a price group controlling the price of the product: https://docs.miva.com/how-to-guides/...-template-code. However this will only work if the pricing is relatively simple
2. Instead of External module you can use the Donation module which functions similar to what the External module does, allowing you to pass in the price via a input to a form: https://apps.miva.com/donation-manager.html
3. Update the product price after it was added to the basket via template code.
Is there any way to dynamically set a products price?
I currently use the external product module, which has various calculations on the page to set the price. I'm looking at moving away from using that module, but I would need to set the price via code rather than having the price set on the product or an attribute. Has there been any newer solutions to this other than the external module?
Leave a comment: