Quantcast
Channel: Help - FoxyCart Forum
Viewing all 2369 articles
Browse latest View live

How to customize the "Allow users to sign up for your newsletter" text and checkbox state.

$
0
0
We are using the Mailchimp integration to allow customers to join the mailing list by using the option in the Templates=>Configuration page. We would like to change the text accompanying the checkbox to explain more about what our mailing list will do to provide value to the customer. We would also like to have the checkbox start out as being checked if at all possible.

We cannot find anywhere in the template where this is added before the automagicache, and would like to know what the best route would be to customize this text and checkbox. Should we just copy the div.fc-checkout__additional-field--subscribe and the inputs as they are placed on the page and insert them into the template prior to caching and disable the option on the configuration page, or would this mess up the script somehow?

adding item to cart using JSONP call and viewing cart

$
0
0
I'm trying to add an item to the cart using a JSONP call following the syntax presented here (using v2.0):
https://wiki.foxycart.com/v/2.0/json

The code is on my local machine, so I'm posting it below.
If I add an item to the cart and view the cart at the same time, on the first click of 'add to cart', the cart opens and displays as empty. All subsequent clicks seem to work fine, and add an item each time and display the cart.

If I replace the form action with "#", and click the view cart link below after clicking 'add to cart', it seems to work fine every time.

How can I successfully both add items to the cart using JSONP and have the cart view?

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script&gt;
<script src="https://cdn.foxycart.com/precisionteststore/loader.js&quot; async defer></script>
<script src="jsonp_submit.js"></script>
</head>
<body>
<form action="https://precisionteststore.foxycart.com/cart?cart=view"&gt;
<input type="submit" value="add to cart" />
</form>
<a href="https://precisionteststore.foxycart.com/cart?cart=view">View cart</a>
</body>
</html>


and the javascript:
var FC = FC || {};
FC.onLoad = function () {
FC.client.on('ready.done', function () {
$('form').submit(function(event) {
FC.client.request('https://'+FC.settings.storedomain+'/cart?name=My+Product&price=3');
console.log('submit clicked!');
});
});
};


thanks

Flat Rate Shipping Using World Regions

$
0
0
Is it possible to customize flat shipping rates based on weight, size, and world regions?

If so how?

Custom Flat Rate Shipping Script Not Working

$
0
0
I am following the exact procedure here:
https://wiki.foxycart.com/v/2.0/snippets/flat_rate_shipping_modification

I set up a flat rate shipping rate of 0 and copied the script exactly into the custom footer. In both cart and checkout the shipping shows up as "TBD" after the script runs. I put a console.log in the logic function and it is not running. `requireShipping()` does run, but it never calls `getShippingInfo()`. I've tried on both the cart and checkout pages.

What I would like to do is specify several tiers of shipping and specify the default selection with a URL parameter when I call the cart. (e.g. default_shipping_method=1)

Here's what I've got so far:
FC.customFlatRates.logic = function (address) {
/* BEGIN CUSTOM SHIPPING LOGIC */
var standardShipping = 5.95;
var freeShippingMin = 35;
var customRates = [
[1, standardShipping, 'Standard', '4-5 Days'],
[2, 17.50, 'Expedited', '2-3 Days'],
[3, 27.70, 'Express', 'Overnight']
];
if(FC.json.total_item_price >= freeShippingMin) {
customRates.forEach(function(rate) {
rate[1] -= standardShipping;
})
}
customRates.forEach(function(rate) {
console.log(rate);
FC.customFlatRates.add(rate[0], rate[1], rate[2], rate[3]);
});
/* END CUSTOM SHIPPING LOGIC */
};


Any input would be appreciated. Thanks!

how to delete customer saved payment info?

$
0
0
One of our customers requested that the saved payment information on their account be removed, and they do not want new payment info to be saved on their account. I understand that this information can only be removed via the API. I looked at the docs and have been trying to perform this action with CURL via command line. I am able to do a successful customer_get action, but I haven't been able to figure out from the docs the proper syntax for deleting the saved payment attributes. Here's what I've tried:

curl -d "api_token=MY_API_KEY&api_action=attribute_delete&type=customer&identifier=MY_CUSTOMER_ID&name=cc_number" https://secure.verdanttea.com/api
Returns: ERROR -- Attribute Not Found

curl -d "api_token=MY_API_KEY&api_action=customer_save&customer_id=MY_CUSTOMER_ID&save_cc=false" https://secure.verdanttea.com/api
Returns: SUCCESS -- Customer Updated ... BUT the cc_type, cc_number_masked, cc_exp_month, and cc_exp_year are still all returning saved data.

What am I doing wrong here?

As an aside, I wish there were a more straightforward way to perform this action. One other thing I want to mention is that at checkout (in ver. 2.0) it seems that the customer is only given the option of saving BOTH their payment info and their addresses. The message next to the checkbox reads "Save my address & payment info for next time." Is it really the case that customer address info can only be saved if payment info is also saved, or is this just a default in the language customizations? In the case of the customer I'm working with now, it would be preferable for them to have the option of saving ONLY their addresses and not their payment info. In previous FC versions it seemed that customers had the option of checking the box to save just their payment information specifically rather than both their payment and address information. Can you clarify this for me? I'd like to understand better so I can explain to the customer whether they need to use guest checkout every time, or if there's a way for them to save only their address information and not the payment information.

Thanks for your help!

Double Unit Price in Receipt Email

$
0
0
In the receipt email the prices are showing up like:

Qty 1, Total: $11.69... 11.691

This shows up when the user enters a 10% off coupon that leaves a fractional price. Where in the template can I remove these extra digits?

Thanks,
- Colin

Strange numbers appearing in Company field and Address 1 field

$
0
0
Each of these has happened twice in the past four days, so we're wondering if it's just a coincidence with customers' data entry problems, some sort of automatic browser fill-in of saved data, or if there's some bug that's causing this.

1. A four-digit number appears in the company field. Once it was 1947 and once it was 1949. Birth years, perhaps?

2. A random-looking number appears at the end of the address line one field. One was 15121 and one was 3915. They don't look like apartment numbers, and they don't have anything to do with the zip code.

I can whisper transaction numbers if that would be helpful. It's not a big deal - just something that's confusing for us and for the customers, and we thought you might have some insight.

dynamically block specific states

$
0
0
Hey guys,

A client sells products that can't ship to certain states. The blocked states vary from product to product. We're passing those states through with the item to the cart. I'm wondering what the best way to block that state from completing checkout might be. Here's the logic I have so far. Open to suggestions and feedback:

<script>
FC.client.on("checkout-shipping-options-update", function() {

var restricted_states = '';

if ( ! jQuery.isEmptyObject(FC.json.items) ) {
jQuery.each(FC.json.items, function(i, item) {

for (var option in item.options) {
if ( item.options[option].class == 'restricted_states' ) {
restricted_states += item.options[option].value;
}
}

});
}

if ( jQuery.inArray( FC.json.shipping_address.region.toLowerCase(), restricted_states.split(',') ) > -1 ) {
console.log("FOUND IT!");
} else {
console.log("DIDN'T FIND IT!");
}

});
</script>


So I end up with a list of states that are blocked. We'd like to stop the customer from checking out and display some kind of validation note that their product can't be shipped to their state. We can pass a custom validation message with each product. I'm just not sure if I can programmatically tweak the Shipping State blacklist or if there's a better way.

Thanks!
Jacob

Integration with UPS SurePost (perhaps via ShipStation)?

$
0
0
UPS has an economy shipping option that is similar to FedEx SmartPost in which they basically partner with USPS for local delivery. This is currently not available with FoxyCart. My UPS representative suggested that if I used ShipStation as middleware (which supports SmartPost), perhaps I could bridge the gap. Does anyone know if this is possible, or has anyone made it work?

Thanks!

Make a button that shows/hides cart?

$
0
0
Hey all, I have a website using the modual cart, however the only way to see the cart now is by adding a product to cart. Is there anyway to make an "show cart" button that reveals the cart? Thanks

How do I add a child product to the cart?

$
0
0
Hello,

I'm just curious, how do I add a child product to a cart with Javascript? I'm using sidecart effect/theme. And I'm also using couchcms.

In fact, I'm tremendously confused as to how I go about doing this, the documentation is no very detailed. If you can walk me through the steps of adding a child product with JS that will greatly appreciated.

Thanks!

Order from Japan has name and address in Japanese characters instead of Roman characters

$
0
0
We just got an order from Japan, and the customer's name and address are displayed in kanji and katakana instead of in the Roman/Latin/English alphabet, which is what we've always seen in the past. Is there anything we can do to keep this from happening in the future? Is there a way to only allow Roman characters in the address fields?

We did switch a few days ago from manual address input to automated postal code lookup, in case this has any bearing on the situation.

I'll whisper the transaction number.

Transaction Feed Not Decrypting In Node.js

$
0
0
I tried the exact snippet from the Transactions Feed docs in Node.js v6.3.0 and it is outputting junk characters instead of "bar." There have been several breaking changes in crypto over the past few versions, so this could be the problem.

var crypto = require('crypto');
var request_body = '%C9C%9F';
var encrypted = unescape(request_body.replace(/\+/g, ' '));
var key = 'foo';
var decipher = crypto.createDecipheriv('rc4', key, '');
var message = decipher.update(encrypted) + decipher.final();
console.log(message); // bar

Datafeed decryption using JavaScript

$
0
0
Hello
I'm trying to decrypt the transaction datafeed using the php xml test code but I'm not able to correctly decrypt the post.
I'm using NodeJS Crypto module (http://nodejs.org/api/crypto.html#crypto_class_decipher) passing the right key and the content received from foxycart but the decrypted text is still binary. I tried to encode it in hex but no way. What is the encoding of the post body? Is it ascii/utf8 or what? Anyone managed to correctly decrypt the feed using only js functions?
Thanks

Upsells and Discounts

$
0
0
Hi,

I've been working on a product customiser:

http://www.phseakayaks.com/customv2/index.php

There are a few more things I need to change / develop before it goes live.

1. Upsells
I've looked at the documentation for upsells and tried to implement but it doesn't work, this documentation is for foxycart 1.0 or below, I'm using 2.0 is there another way upsells need to be implemented in FC 2.0?
https://wiki.foxycart.com/snippets/misc_cart_and_checkout/product_upselling

Another way I thought I could set upsells is by redirecting the main product link to an upsell page. But then I want the customer to be able to add multiple products from this page to the cart without being redirected or sent to the checkout page every time.

2. Taking a deposit at checkout.
We make custom kayaks, what we need to be able to do is take a 20% deposit for the product and have the customer pay the rest on collection.
The only way that's made sense to do this at the moment is by using a coupon code. Doing this meant that in the cart a minus figure was shown at the checkout for the balance left to pay by the customer on collection, which will make no sense to the customer. I've got round this by using css :first-letter to hide the '-'. This works in the browser and on email receipts for some email clients, but in outlook the - still shows. Is there a way I can calculate the balance to pay without using a coupon code.



Issues with Shipping Size and USPS Flat Rate Shipping

$
0
0
I have a customer who's trying to use USPS flat rate shipping, but it doesn't seem to be working the way we had expected.

Right now they sell products at varying sizes, so they need to offer shipping from small flat rate envelopes to large boxes. We had expected that by passing the product dimensions the it would eliminate shipping options that are too small, even when the order large items the small flat rate envelope is an option.

Any ideas? Am i missing something?

Child product not appearing (showing up as regular product)!

$
0
0
Hi there,

Could someone help me out with this one, I want to add a child product 'B' to an existing product 'A' but whenever I implement the code, the child product just shows up as a regular independent product that can be removed (I don't want this).

Here's the code:

<script>
FC.client.request('https://mydomain.foxycart.com/cart?'+$('#parentForm').serialize()).done(function(dataJSON) {
FC.client.request('https://mydomain.foxycart.com/cart?'+$('#childForm').serialize()).done(function(dataJSON){
FC.sidecart.show()
});
});
</script>

<form name="parentForm" action="https://mydomain.foxycart.com/cart&quot; method="post" id="productPromotion" accept-charset="utf-8">
<input type="hidden" name="name" value="Product Name" class="target__title" />
<input type="hidden" name="price" />
<input type="hidden" name="code" class="target__code"/>
<!--<input type="hidden" name="category" value="<cms:show product_fc_category/>" />-->
<input type="hidden" name="image" value="<cms:show_repeatable 'product_images'><cms:if k_count='1'><cms:show product_image/></cms:if></cms:show_repeatable>" />
<input type="hidden" name="url" value="<cms:show k_page_link/>"/>
<input type="hidden" name="quantity" value="1">
</form>


<form name="childForm" action="https://mydomain.foxycart.com/cart&quot; id="productchild" method="post" accept-charset="utf-8">
<input type="hidden" name="name" value="FREE PRODUCT" />
<input type="hidden" name="price" value="0.00"/>
<input type="hidden" name="parent_code" class="questionable_code"/>
<input type="hidden" name="code" value="10100"/>
<input type="hidden" name="image" value="<cms:show src='https:/path/to/my/image.png'/>" />
<input type="text" name="quantity_min" value="1" />
<input type="hidden" name="weight" value="5"/>
</form>
I'm getting the right data but again still having that issue with the child product not behaving like a child or bundled product.

Any help will be greatly appreciated, thanks!

Change payment gateway, what happens to subscriptions?

$
0
0
Hey guys,

I searched the forum but couldn't find a relevant thread.

A client is currently using PayPal Pro and deprecated Express. We have all kinds of issues with that since they also have legacy (pre-FC) subscriptions that are still active, which means they couldn't update their IPN... fun.

So, we'll handle the Express subscriptions separately, but what we want to know is what happens to the PayPal Pro subscriptions if we change our gateway to Stripe. Will the active subscription just try to process through whichever gateway is active? Or do we run into issues since we don't have a customer record in Stripe for the existing subscription?

Thank you!
-Jacob

FC2 + MailChimp

$
0
0
I'm thoroughly confused as usual. I don't know which files I'm to use and where. I'm attempting to integrate FoxyCart 2.x to Subscribe to our Newsletter via the Subscribe checkbox in the Configuration file.

So where do I edit the files:
Within the fc-mailchimp.php file - you'll need to update the $Custom_Field variable to be set to newsletter_subscribe, and the $Custom_Field_Value to 1 like this:

The above comes from the wiki:
https://wiki.foxycart.com/integration/mailchimp#foxycart_20

Thank you,
Peter

Changing subscription price and frequency options

$
0
0
Hi there,

Just want to make sure I understand how things work - using Foxycart v 1.1

All our subscriptions are ongoing - no end date, recurring every x weeks. If we change any prices, the new prices will only affect NEW subscriptions. Correct?
If so, that's good. Just want to check before meddling with prices.

Also, can a day of the week (e.g. Monday) be set as the next order date for subscriptions? Or just dates (e.g. the 10th)?

For example, orders process on Fridays. So, if someone signs up for an every 2 week subscription today (Tuesday), they pay immediately for the 1st order which has a start date of today + 3 days (Friday) and subsequent orders process every 2 Fridays.

Did that make sense? Can subscriptions be set up that way?

Thanks!
Viewing all 2369 articles
Browse latest View live