6 / 6
Feb 2017

Hello,



We use Ejunkie cart from our php product selling pages on which the customer cas see the product price before clickiing to add it into the cart: is there a way to send a request to Ejunkie to get the price and the currency of a product?

This would allow our product selling pages to automically show this price on the selling page dynamically.

As for now we have to write manually each item price into our web pages and is this really painfull if we have to change a price for any reason (for example for a promo or so)



Note that if such feature does not exist, could you please put it in your todo-list, as this is not a risky feature (no confidentiality issue) to request for the price/currrency of a product item.



Thanks and regards,

Louis

  • created

    Jul '16
  • last reply

    Feb '17
  • 5

    replies

  • 1.6k

    views

  • 3

    users

At present we have no way to accomplish what you described, though we have discussed creating an API for that sort of thing, so we'll keep that on the wishlist for future consideration.

8 days later

I asked this same question many years ago and got the same response. Here is the work around I use.



1. Copy this code into a text file, save it as prices.js, and upload it to the root of your website.



---code---

var xFoot = 1 // 1 = footer link on 0 = footer link off



//Product Prices (This where you change the prices)



var xproductid1 = "$9.99" //name of product 1

var xproductid2 = "$4.99" //name of product 2

var xproductid3 = "$49.99" //name of product 3



//Product Price Function

function priceproductid1() {

if (xFoot == 1) {

xDisp = "" + xproductid1 + "";

}

document.write(xDisp)

}



function priceproductid2() {

if (xFoot == 1) {

xDisp = "" + xproductid2 + "";

}

document.write(xDisp)

}



function priceproductid3() {

if (xFoot == 1) {

xDisp = "" + xproductid3 + "";

}

document.write(xDisp)

}

---code---





2. Add the following to each of your webpages



<script type="text/javascript" src="../prices.js"></script>



3. Replace the numerical value for each price on a page with the following of the corresponding product.



<script>priceproductid1();</script>



Now you only need to change the price in one location (prices.js)

Follow the code pattern to add more products prices

7 months later

Hello



Coult this tip with "price.js" work also for changing the currency of a product? not only the price?



Thanks,

Louis

You could include a currency in the prices displayed by price.js, like so:



var xproductid1 = "9.99 USD" //name of product 1

var xproductid2 = "4.99 USD" //name of product 2

var xproductid3 = "49.99 USD" //name of product 3



Of course, the actual price and currency of each product is set in Seller Admin, so this approach would only be useful to ease keeping the displayed price/currency on your sales page up to date. While it is not possible to set multiple prices in differing currencies for a single product, you can create duplicate products that each have a different pricing currency. Regardless of your pricing currency, buyers worldwide will be able to pay you in that currency, and their payment processor or card issuer would automatically convert that amount to their native currency.